code: def test_write_molecule(self):
      current_dir = os.path.dirname(os.path.realpath(__file__))
      ligand_file = os.path.join(
          current_dir, "../../dock/tests/1jld_ligand.sdf"
      )
      xyz, mol = rdkit_utils.load_molecule(
          ligand_file, calc_charges=False, add_hydrogens=False
      )
  
      with tempfile.TemporaryDirectory() as tmp:
          outfile = os.path.join(tmp, "mol.sdf")
          rdkit_utils.write_molecule(mol, outfile)
  
          xyz, mol2 = rdkit_utils.load_molecule(
              outfile, calc_charges=False, add_hydrogens=False
          )
  
      assert mol.GetNumAtoms() == mol2.GetNumAtoms()
      for atom_idx in range(mol.GetNumAtoms()):
          atom1 = mol.GetAtoms()[atom_idx]
          atom2 = mol.GetAtoms()[atom_idx]
          assert atom1.GetAtomicNum() == atom2.GetAtomicNum()
  
imports: import tempfile
  import unittest
  import os
  import numpy
  from deepchem.utils import rdkit_utils
label_desc: Use image node_id 9 for calling the TestRdkitUtil obj's underlying member method code with example usage: obj.test_write_molecule() without return types