def _get_aligned_phrases(root_phrase, axis, spread=[0, 0]):
    return [
        phrase for cell in root_phrase.table.cells
        if is_axis_aligned(root_phrase, cell, axis=axis, spread=spread)
        for phrase in cell.phrases if phrase != root_phrase
    ]
def _get_aligned_cells(root_cell, axis):
    aligned_cells = [
        cell for cell in root_cell.table.cells
        if is_axis_aligned(root_cell, cell, axis=axis) and cell != root_cell
    ]
    return aligned_cells