def _find_by_name(tree_data, name, is_dir, start_at):
    try:
        item = tree_data[start_at]
        if item and item[2] == name and S_ISDIR(item[1]) == is_dir:
            tree_data[start_at] = None
            return item
    except IndexError:
        pass
    # END exception handling
    for index, item in enumerate(tree_data):
        if item and item[2] == name and S_ISDIR(item[1]) == is_dir:
            tree_data[index] = None
            return item
        # END if item matches
    # END for each item
    return None
usage:
dataset/ETHPy150Open gitpython-developers/GitPython/git/objects/fun.py/_find_by_name--crossover with--dataset/ETHPy150Open baskoopmans/djcommon/djcommon/decorators.py/class_decorator