class_docstr: Test RdkitGridFeaturizer class defined in rdkit_grid_featurizer module.
code: def test_force_flatten(self):
      # test if input is flattened when flat features are used
      featurizer = RdkitGridFeaturizer(
          feature_types=["ecfp_hashed"], flatten=False
      )
      featurizer.flatten = (
          True  # False should be ignored with ecfp_hashed
      )
      feature_tensor = featurizer.featurize(
          [(self.ligand_file, self.protein_file)]
      )
      self.assertIsInstance(feature_tensor, np.ndarray)
      self.assertEqual(
          feature_tensor.shape, (1, 2 * 2**featurizer.ecfp_power)
      )
  
file_path: deepchem/deepchem/feat/tests/test_rdkit_grid_features.py
imports: import os
  import unittest
  import numpy
  from deepchem.feat import RdkitGridFeaturizer
label_desc: Use image node_id 4 for calling the TestRdkitGridFeaturizer obj's underlying member method code with example usage: obj.test_force_flatten() without return types