code: def add_node_by_name(self, node_name: str, external_id: Optional[str] = None) -> None:
          
          if node_name is None:
              return
  
          node_name = node_name.strip()
          if len(node_name) == 0:
              return
  
          node: Node = self.get_node_by_name(node_name, external_id=external_id)
          if node is None:
              self._internal_add_node(node_name=node_name,
                                      external_id=external_id,
                                      are_neighbors_cached=False,
                                      add_to_cache=True)
docs: Adds a new node to the graph if it doesn't exist.
  
          Arguments:
              node_name (str): The name of the node to add.
              external_id (Optional[str]): The external ID of the node.