def METHOD_NAME(base, depth):
    l1_paths = L1_JOINABLE_TABLES_DICT[base]
    if depth <= 1:
        return l1_paths
    else:
        return [
            {
                BASE: row[BASE],
                TARGET: target_row[TARGET],
                JP_PATH: row[JP_PATH] + target_row[JP_PATH],
                FK_PATH: None,
                DEPTH: row[DEPTH] + target_row[DEPTH],
                MULTIPLE_RESULTS: row[MULTIPLE_RESULTS] or target_row[MULTIPLE_RESULTS]
            }
            for row in l1_paths
            for target_row in METHOD_NAME(row[TARGET], depth - 1)
            if row[JP_PATH][-1] != target_row[JP_PATH][0][::-1]
        ]