def can_visit_small_cave(path, node):
    """
    Determined if dfs should visit a specific small cave
    :param path: list of nodes on a path
    :param node: current dfs node
    :return: Bool value
    """
    if node not in path:
        return True

    filtered_list = list(filter(lambda n: n.islower() and n not in {'start', 'end'}, path))

    if len(filtered_list) == len(set(filtered_list)):
        return True

    return False