code: def test_featurizer_single_atom(test_parameters):
      """
      Test for featurization of "C" using `DMPNNFeaturizer` class.
      """
      (
          features_generators,
          is_adding_hs,
          use_original_atom_ranks,
      ) = test_parameters.values()
      featurizer = DMPNNFeaturizer(
          features_generators=features_generators,
          is_adding_hs=is_adding_hs,
          use_original_atom_ranks=use_original_atom_ranks,
      )
      graph_feat = featurizer.featurize(smiles)
      assert len(graph_feat) == 3
  
      if is_adding_hs:
          assert graph_feat[2].num_nodes == 5
          assert (
              graph_feat[2].num_node_features
              == GraphConvConstants.ATOM_FDIM
          )
          assert graph_feat[2].node_features.shape == (
              5,
              GraphConvConstants.ATOM_FDIM,
          )
          assert graph_feat[2].num_edges == 8
          assert (
              graph_feat[2].num_edge_features
              == GraphConvConstants.BOND_FDIM
          )
          assert graph_feat[2].edge_features.shape == (
              8,
              GraphConvConstants.BOND_FDIM,
          )
      else:
          assert graph_feat[2].num_nodes == 1
          assert (
              graph_feat[2].num_node_features
              == GraphConvConstants.ATOM_FDIM
          )
          assert graph_feat[2].node_features.shape == (
              1,
              GraphConvConstants.ATOM_FDIM,
          )
          assert graph_feat[2].num_edges == 0
          assert (
              graph_feat[2].num_edge_features
              == GraphConvConstants.BOND_FDIM
          )
          assert graph_feat[2].edge_features.shape == (
              0,
              GraphConvConstants.BOND_FDIM,
          )
  
      if features_generators:
          assert (
              len(graph_feat[2].global_features) == 2048
          )  # for `morgan` features generator
          nonzero_features_indicies = graph_feat[
              2
          ].global_features.nonzero()[0]
          if is_adding_hs:
              assert len(nonzero_features_indicies) == 4
          else:
              assert len(nonzero_features_indicies) == 1
      else:
          assert graph_feat[2].global_features.size == 0
  
      if use_original_atom_ranks:
          assert (
              graph_feat[2].edge_index == edge_index_orignal_order[2]
          ).all()
      else:
          if np.array_equal(
              graph_feat[2].edge_index.shape,
              edge_index_orignal_order[2],
          ):
              # the atom order for 'C' is same in case of canonical and original ordering
              assert (
                  graph_feat[2].edge_index
                  == edge_index_orignal_order[2]
              ).all()
  
imports: from deepchem.feat.molecule_featurizers.dmpnn_featurizer import DMPNNFeaturizer, GraphConvConstants
  import numpy
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_featurizer_single_atom(test_parameters) without return types