src/graph.py
def __check_node(self, node: int):
        '''
        Check if node exists on graph.
        Args:
            node: id of the node to be checked
        Return:
            True if node exists on graph, false otherwise
        '''
        try:
            self.graph.node[node]
            return True
        except KeyError:
            print("Author id {} does not exist on graph".format(str(node)))
            return False

        Check if node exists on graph.
        Args:
            node: id of the node to be checked
        Return:
            True if node exists on graph, false otherwise
        
Check if node exists on graph.
Check if node exists on graph .
def __check_node(self, node: int):
        try:
            self.graph.node[node]
            return True
        except KeyError:
            print("Author id {} does not exist on graph".format(str(node)))
            return False
def __check_node ( self , node : int ) : try : self . graph . node [ node ] return True except KeyError : print ( "Author id {} does not exist on graph" . format ( str ( node ) ) ) return False
Check if node exists on graph.
Check if node exists on graph .
'''
        Check if node exists on graph.
        Args:
            node: id of the node to be checked
        Return:
            True if node exists on graph, false otherwise
        '''
self
node
int
id of the node to be checked
id of the node to be checked