code: def mol2graph(smiles, mol, khop=1):
      try:
          Chem.SanitizeMol(mol)
          mol = Chem.RemoveHs(mol)
          dft_success = 1
      except Exception as e:
          # mol = rdkit_embed(smiles)
          mol = rdkit_embed2d(smiles)
          # conf = mol.GetConformer()
          # print(conf.GetAtomPosition(0).x, conf.GetAtomPosition(0).y, conf.GetAtomPosition(0).z)
          dft_success = 0
      mol.UpdatePropertyCache()
      graph = rdkit_mol2graph(mol, khop, with_3d=True)
      graph["smiles"] = smiles
      graph["dft_success"] = dft_success
      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 8 for calling a global function with example usage: mol2graph(smiles, mol, khop) and returns: graph