class_docstr: Test for `generate_global_features` helper function which generates global features for DMPNN featurizer
class_docstr_tok: ["Test","for","`","generate_global_features","`","helper","function","which","generates","global","features","for","DMPNN","featurizer"]
docstr: Test for generator when 'morgan' feature generator is provided
docstr_tok: ["Test","for","generator","when","'morgan","'","feature","generator","is","provided"]
code: def test_generator_morgan(self):
      """
      Test for generator when 'morgan' feature generator is provided
      """
      global_features = generate_global_features(
          self.mol[0], self.feature_generators[1]
      )
      assert len(global_features) == 2048
  
      nonzero_features_indices = global_features.nonzero()[0]
      assert len(nonzero_features_indices) == 1
      assert nonzero_features_indices[0] == 1264
      assert global_features[nonzero_features_indices[0]] == 1.0
  
file_path: deepchem/deepchem/feat/tests/test_global_feature_generator_dmpnn.py
imports: import unittest
  import numpy
  from rdkit import Chem
  from deepchem.feat.molecule_featurizers.dmpnn_featurizer import generate_global_features
label_desc: Use image node_id 3 for calling the TestGlobalFeatureGenerator obj's underlying member method code with example usage: obj.test_generator_morgan() without return types