docs: def _store_graph_parts(self, graph: BELGraph, use_tqdm: bool = False) -> Tuple[List[Node], List[Edge]]:
          """Store the given graph into the edge store.
  
          :raises: pybel.resources.exc.ResourceError
          :raises: EdgeAddError
          """
          log.debug('inserting %s into edge store', graph)
          log.debug('building node models')
          node_model_build_start = time.time()
  
          nodes = list(graph)
          if use_tqdm:
              nodes = tqdm(nodes, total=graph.number_of_nodes(), desc='nodes')
  
          node_model = {}
          for node in nodes:
              namespace = node.get(NAMESPACE)
  
              if graph.skip_storing_namespace(namespace):
                  continue  # already know this node won't be cached
  
              node_object = self.get_or_create_node(graph, node)
  
              if node_object is None:
                  log.warning('can not add node %s', node)
                  continue
  
              node_model[node] = node_object
  
          node_models = list(node_model.values())
          log.debug('built %d node models in %.2f seconds', len(node_models), time.time() - node_model_build_start)
  
          node_model_commit_start = time.time()
          self.session.add_all(node_models)
          self.session.commit()
          log.debug('stored %d node models in %.2f seconds', len(node_models), time.time() - node_model_commit_start)
  
          log.debug('building edge models')
          edge_model_build_start = time.time()
  
          edges = graph.edges(keys=True, data=True)
          if use_tqdm:
              edges = tqdm(edges, total=graph.number_of_edges(), desc='edges')
  
          edge_models = list(self._get_edge_models(graph, node_model, edges))
  
          log.debug('built %d edge models in %.2f seconds', len(edge_models), time.time() - edge_model_build_start)
  
          edge_model_commit_start = time.time()
          self.session.add_all(edge_models)
          self.session.commit()
          log.debug('stored %d edge models in %.2f seconds', len(edge_models), time.time() - edge_model_commit_start)
  
          return node_models, edge_models