code: def gen_context_id(graph):
      g = graph
      N = graph["num_nodes"]
      E = graph["num_edges"]
      full_bond_indices = np.arange(E)
  
      target_labels = []
      target_twohop = []
      # target_threehop = []
  
      for atom_index in range(N):
          nei_bond_indices = full_bond_indices[
              g["edge_index"][0, :] == atom_index
          ]
          nei_atom_indices = g["edge_index"][1, nei_bond_indices]
  
          neinei_bond_indices = full_bond_indices[
              np.isin(g["edge_index"][0, :], nei_atom_indices)
          ]
          neinei_atom_indices = g["edge_index"][1, neinei_bond_indices]
  
          # neineinei_bond_indices = full_bond_indices[np.isin(g['edge_index'][0, :], neinei_atom_indices)]
          # neineinei_atom_indices = g['edge_index'][1, neineinei_bond_indices]
  
          subgraph_str = get_graph_str(
              g, atom_index, nei_atom_indices, nei_bond_indices
          )
          subgraph_id = md5_hash(subgraph_str) % 1000
          target_labels.append(subgraph_id)
  
          subgraph_twohop_str = get_graph_twohop_str(
              graph,
              atom_index,
              nei_atom_indices,
              nei_bond_indices,
              neinei_atom_indices,
              neinei_bond_indices,
          )
          subgraph_twoid = md5_hash(subgraph_twohop_str) % 5000
          target_twohop.append(subgraph_twoid)
  
          # subgraph_threehop_str = get_graph_threehop_str(graph, atom_index, nei_atom_indices, nei_bond_indices, neinei_atom_indices, neinei_bond_indices, neineinei_atom_indices, neineinei_bond_indices)
          # subgraph_threeid = md5_hash(subgraph_threehop_str) % 5000
          # target_threehop.append(subgraph_threeid)
  
      target_labels = np.array(target_labels)
      graph["context_id"] = target_labels
      graph["twohop_context"] = target_twohop
      # graph['threehop_context'] = target_threehop
      return graph
  
imports: import numpy
  import rdkit
  from rdkit import Chem
  from rdkit.Chem import AllChem
  import rdkit.Chem.rdPartialCharges
  from ogb.utils.features import allowable_features, atom_to_feature_vector, atom_feature_vector_to_dict, bond_feature_vector_to_dict
  from local_feature import bond_to_feature_vector, get_bond_feature_dims
  from copy import deepcopy
  import hashlib
label_desc: Use image node_id 11 for calling a global function with example usage: gen_context_id(graph) and returns: graph