docs: def load_edges_into_db(
      nanopub_id: str,
      nanopub_url: str,
      edges: list = [],
      edges_coll_name: str = edges_coll_name,
      nodes_coll_name: str = nodes_coll_name,
  ):
      """Load edges into Edgestore"""
  
      start_time = datetime.datetime.now()
  
      # Clean out edges for nanopub in edgestore
      query = f"""
          FOR edge IN {edges_coll_name}
              FILTER edge.nanopub_id == "{nanopub_id}"
              REMOVE edge IN edges
      """
  
      try:
          edgestore_db.aql.execute(query)
      except Exception as e:
          log.debug(f"Could not remove nanopub-related edges: {query}  msg: {e}")
  
      end_time1 = datetime.datetime.now()
      delta_ms = f"{(end_time1 - start_time).total_seconds() * 1000:.1f}"
      log.info("Timing - Delete edges for nanopub", delta_ms=delta_ms)
  
      # Clean out errors for nanopub in pipeline_errors
      query = f"""
          FOR e IN pipeline_errors
              FILTER e.nanopub_id == "{nanopub_id}"
              REMOVE e IN pipeline_errors
      """
      try:
          edgestore_db.aql.execute(query)
      except Exception as e:
          log.debug(f"Could not remove nanopub-related errors: {query} msg: {e}")
  
      end_time2 = datetime.datetime.now()
      delta_ms = f"{(end_time2 - end_time1).total_seconds() * 1000:.1f}"
      log.info("Timing - Delete pipeline errors for nanopub", delta_ms=delta_ms)
  
      # Collect edges and nodes to load into arangodb
      node_list, edge_list = [], []
      for doc in edge_iterator(edges=edges):
          if doc[0] == "nodes":
              node_list.append(doc[1])
          else:
              edge_list.append(doc[1])
  
      end_time3 = datetime.datetime.now()
      delta_ms = f"{(end_time3 - end_time2).total_seconds() * 1000:.1f}"
      log.info("Timing - Collect edges and nodes", delta_ms=delta_ms)
  
      try:
          results = edgestore_db.collection(edges_coll_name).import_bulk(
              edge_list, on_duplicate="replace", halt_on_error=False
          )
      except Exception as e:
          log.error(f"Could not load edges  msg: {e}")
  
      end_time4 = datetime.datetime.now()
      delta_ms = f"{(end_time4 - end_time3).total_seconds() * 1000:.1f}"
      log.info("Timing - Load edges into edgestore", delta_ms=delta_ms)
  
      try:
          results = edgestore_db.collection(nodes_coll_name).import_bulk(
              node_list, on_duplicate="replace", halt_on_error=False
          )
      except Exception as e:
          log.error(f"Could not load nodes  msg: {e}")
  
      end_time5 = datetime.datetime.now()
      delta_ms = f"{(end_time5 - end_time4).total_seconds() * 1000:.1f}"
      log.info("Timing - Load nodes into edgestore", delta_ms=delta_ms)