code: def test_parse_moldesc():
      """Tests Moldesc Parser."""
      from deepchem.utils.dft_utils import parse_moldesc
  
      system = {
          "type": "mol",
          "kwargs": {
              "moldesc": "H 0.86625 0 0; F -0.86625 0 0",
              "basis": "6-311++G(3df,3pd)",
          },
      }
      atomzs, atomposs = parse_moldesc(system["kwargs"]["moldesc"])
      assert torch.allclose(
          atomzs, torch.tensor([1.0, 9.0], dtype=torch.float64)
      )
      assert torch.allclose(
          atomposs,
          torch.tensor(
              [
                  [0.86625, 0.00000, 0.00000],
                  [-0.86625, 0.00000, 0.00000],
              ],
              dtype=torch.float64,
          ),
      )
      system2 = (
          ["H", "F"],
          torch.tensor([[0.86625, 0, 0], [-0.86625, 0, 0]]),
      )
      atomzs2, atomposs2 = parse_moldesc(system2)
      assert torch.allclose(
          atomzs2, torch.tensor([1.0, 9.0], dtype=torch.float64)
      )
      assert torch.allclose(
          atomposs2,
          torch.tensor(
              [
                  [0.86625, 0.00000, 0.00000],
                  [-0.86625, 0.00000, 0.00000],
              ],
              dtype=torch.float64,
          ),
      )
  
file_path: deepchem/deepchem/utils/test/test_dft_utils.py
imports: import pytest
  import numpy
  from typing import Union
label_desc: Use image node_id 5 for calling a global function with example usage: test_parse_moldesc() without return types