What is the intention of the program below?

This is the structure of the NAME_1:

````
class NAME_1:
    def __init__(
        self,
        value=None,
        successor=None,
        successors=[],
        predecessors=[],
        incoming_nodes=[],
        outgoing_nodes=[],
    ):
        self.value = value
        self.successor = successor
        self.successors = successors
        self.predecessors = predecessors
        self.incoming_nodes = incoming_nodes
        self.outgoing_nodes = outgoing_nodes
````

````
def p4(startnode, goalnode):
    nodesvisited = set()

    def search_from(NAME_1):
        if NAME_1 in nodesvisited:
            return False
        elif NAME_1 is goalnode:
            return True
        else:
            nodesvisited.add(NAME_1)
            return any(
                search_from(nextnode) for nextnode in NAME_1.successors
            )

    return search_from(startnode)
````