docs: def nanopub_to_edges(nanopub: dict = {}, rules: List[str] = [], orthologize_targets: list = []):
      """Process nanopub into edges and load into EdgeStore
  
      Args:
          nanopub: BEL Nanopub
          rules: list of compute rules to process
          orthologize_targets: list of species in TAX:<int> format
  
      Returns:
          list: of edges
  
      Edge object:
          {
              "edge": {
                  "subject": {
                      "name": subj_canon,
                      "name_lc": subj_canon.lower(),
                      "label": subj_lbl,
                      "label_lc": subj_lbl.lower(),
                      "components": subj_components,
                  },
                  "relation": {  # relation _key is based on a hash
                      "relation": edge_ast.bel_relation,
                      "edge_hash": edge_hash,
                      "edge_dt": edge_dt,
                      "nanopub_url": nanopub_url,
                      "nanopub_id": nanopub_id,
                      "citation": citation,
                      "subject_canon": subj_canon,
                      "subject": subj_lbl,
                      "object_canon": obj_canon,
                      "object": obj_lbl,
                      "annotations": nanopub['annotations'],
                      "metadata": nanopub['metadata'],
                      "public_flag": True,  # will be added when groups/permissions feature is finished,
                      "edge_types": edge_types,
                  },
                  'object': {
                      "name": obj_canon,
                      "name_lc": obj_canon.lower(),
                      "label": obj_lbl,
                      "label_lc": obj_lbl.lower(),
                      "components": obj_components,
                  }
              }
          }
      """
  
      # Collect input values ####################################################
      nanopub_url = nanopub.get("source_url", "")
  
      edge_dt = utils.dt_utc_formatted()  # don't want this in relation_id
  
      # Extract BEL Version and make sure we can process this
      if nanopub["nanopub"]["type"]["name"].upper() == "BEL":
          bel_version = nanopub["nanopub"]["type"]["version"]
          versions = bel.lang.bel_specification.get_bel_versions()
          if bel_version not in versions:
              log.error(
                  f"Do not know this BEL Version: {bel_version}, these are the ones I can process: {versions.keys()}"
              )
              return []
      else:
          log.error(
              f"Not a BEL Nanopub according to nanopub.type.name: {nanopub['nanopub']['type']['name']}"
          )
          return []
  
      # Required for BEL parsing/canonicalization/orthologization
      api_url = config["bel_api"]["servers"]["api_url"]
  
      try:
          citation_string = normalize_nanopub_citation(nanopub)
      except Exception as e:
          log.error(f"Could not create citation string for {nanopub_url}")
          citation_string = ""
  
      if orthologize_targets == []:
          if config["bel_api"].get("edges", None):
              orthologize_targets = config["bel_api"]["edges"].get("orthologize_targets", [])
  
      # orig_species_id = [anno['id'] for anno in nanopub['nanopub']['annotations'] if anno['type'] == 'Species']
      # if orig_species_id:
      #     orig_species_id = orig_species_id[0]
  
      master_annotations = copy.deepcopy(nanopub["nanopub"]["annotations"])
      master_metadata = copy.deepcopy(nanopub["nanopub"]["metadata"])
      master_metadata.pop("gd_abstract", None)
  
      nanopub_type = nanopub["nanopub"]["metadata"].get("nanopub_type")
  
      # Create Edge Assertion Info ##############################################
      # r = generate_assertion_edge_info(nanopub['nanopub']['assertions'], orig_species_id, orthologize_targets, bel_version, api_url, nanopub_type)
      r = generate_assertion_edge_info(
          nanopub["nanopub"]["assertions"], orthologize_targets, bel_version, api_url, nanopub_type
      )
      edge_info_list = r["edge_info_list"]
  
      # Build Edges #############################################################
      edges = []
      errors = []
      for edge_info in edge_info_list:
          annotations = copy.deepcopy(master_annotations)
          metadata = copy.deepcopy(master_metadata)
  
          errors.extend(edge_info["errors"])
  
          if not edge_info.get("canonical"):
              continue
  
          # TODO - remove this
          # if edge_info.get('species_id', False):
          #     annotations = orthologize_context(edge_info['species_id'], annotations)
  
          edge_hash = utils._create_hash(
              f'{edge_info["canonical"]["subject"]} {edge_info["canonical"]["relation"]} {edge_info["canonical"]["object"]}'
          )
  
          edge = {
              "edge": {
                  "subject": {
                      "name": edge_info["canonical"]["subject"],
                      "name_lc": edge_info["canonical"]["subject"].lower(),
                      "label": edge_info["decanonical"]["subject"],
                      "label_lc": edge_info["decanonical"]["subject"].lower(),
                      "components": edge_info["subject_comp"],
                  },
                  "relation": {
                      "relation": edge_info["canonical"]["relation"],
                      "edge_hash": edge_hash,
                      "edge_dt": edge_dt,
                      "nanopub_url": nanopub_url,
                      "nanopub_id": nanopub["nanopub"]["id"],
                      "citation": citation_string,
                      "subject_canon": edge_info["canonical"]["subject"],
                      "subject": edge_info["decanonical"]["subject"],
                      "object_canon": edge_info["canonical"]["object"],
                      "object": edge_info["decanonical"]["object"],
                      "annotations": copy.deepcopy(annotations),
                      "metadata": copy.deepcopy(metadata),
                      "public_flag": True,
                      "edge_types": edge_info["edge_types"],
                      "species_id": edge_info["species_id"],
                      "species_label": edge_info["species_label"],
                  },
                  "object": {
                      "name": edge_info["canonical"]["object"],
                      "name_lc": edge_info["canonical"]["object"].lower(),
                      "label": edge_info["decanonical"]["object"],
                      "label_lc": edge_info["decanonical"]["object"].lower(),
                      "components": edge_info["object_comp"],
                  },
              }
          }
  
          edges.append(copy.deepcopy(edge))
  
      return {
          "edges": edges,
          "nanopub_id": nanopub["nanopub"]["id"],
          "nanopub_url": nanopub_url,
          "success": True,
          "errors": errors,
      }