class_docstr: This class implements the featurization to implement Duvenaud graph convolutions.
  
  Duvenaud graph convolutions [1]_ construct a vector of descriptors for each
  atom in a molecule. The featurizer computes that vector of local descriptors.
  
  Examples
  ---------
  >>> import deepchem as dc
  >>> smiles = ["C", "CCC"]
  >>> featurizer=dc.feat.ConvMolFeaturizer(per_atom_fragmentation=False)
  >>> f = featurizer.featurize(smiles)
  >>> # Using ConvMolFeaturizer to create featurized fragments derived from molecules of interest.
  ... # This is used only in the context of performing interpretation of models using atomic
  ... # contributions (atom-based model interpretation)
  ... smiles = ["C", "CCC"]
  >>> featurizer=dc.feat.ConvMolFeaturizer(per_atom_fragmentation=True)
  >>> f = featurizer.featurize(smiles)
  >>> len(f) # contains 2 lists with  featurized fragments from 2 mols
  2
  
  See Also
  --------
  Detailed examples of `GraphConvModel` interpretation are provided in Tutorial #28
  
  References
  ---------
  
  .. [1] Duvenaud, David K., et al. "Convolutional networks on graphs for
      learning molecular fingerprints." Advances in neural information
      processing systems. 2015.
  
  Note
  ----
  This class requires RDKit to be installed.
docstr: Override parent: aim is to add handling atom-depleted molecules featurization
  
  Parameters
  ----------
  datapoints: rdkit.Chem.rdchem.Mol / SMILES string / iterable
      RDKit Mol, or SMILES string or iterable sequence of RDKit mols/SMILES
      strings.
  log_every_n: int, default 1000
      Logging messages reported every `log_every_n` samples.
  
  Returns
  -------
  features: np.ndarray
      A numpy array containing a featurized representation of `datapoints`.
docstr_tok: ["Override","parent",":","aim","is","to","add","handling","atom-depleted","molecules","featurization","Parameters","--","--","--","--","--","datapoints",":","rdkit.Chem.rdchem.Mol","\/","SMILES","string","\/","iterable","RDKit","Mol",",","or","SMILES","string","or","iterable","sequence","of","RDKit","mols\/SMILES","strings",".","log_every_n",":","int",",","default","1000","Logging","messages","reported","every","`","log_every_n","`","samples",".","Returns","--","--","--","-","features",":","np.ndarray","A","numpy","array","containing","a","featurized","representation","of","`","datapoints","`","."]
code: def featurize(
      self,
      datapoints: Union[
          RDKitMol, str, Iterable[RDKitMol], Iterable[str]
      ],
      log_every_n: int = 1000,
      **kwargs,
  ) -> np.ndarray:
      """
      Override parent: aim is to add handling atom-depleted molecules featurization
  
      Parameters
      ----------
      datapoints: rdkit.Chem.rdchem.Mol / SMILES string / iterable
          RDKit Mol, or SMILES string or iterable sequence of RDKit mols/SMILES
          strings.
      log_every_n: int, default 1000
          Logging messages reported every `log_every_n` samples.
  
      Returns
      -------
      features: np.ndarray
          A numpy array containing a featurized representation of `datapoints`.
      """
      if "molecules" in kwargs and datapoints is None:
          datapoints = kwargs.get("molecules")
          raise DeprecationWarning(
              'Molecules is being phased out as a parameter, please pass "datapoints" instead.'
          )
  
      features = super(ConvMolFeaturizer, self).featurize(
          datapoints, log_every_n=1000
      )
      if self.per_atom_fragmentation:
          # create temporary valid ids serving to filter out failed featurizations from every sublist
          # of features (i.e. every molecules' frags list), and also totally failed sublists.
          # This makes output digestable by Loaders
          valid_frag_inds = [
              [True if np.array(elt).size > 0 else False for elt in f]
              for f in features
          ]
          features = np.array(
              [
                  [elt for (is_valid, elt) in zip(l, m) if is_valid]
                  for (l, m) in zip(valid_frag_inds, features)
                  if any(l)
              ],
              dtype=object,
          )
      return features
  
imports: import numpy
  import deepchem
  from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.feat.mol_graphs import ConvMol, WeaveMol
  from deepchem.data import DiskDataset
  import logging
  from typing import Optional, List, Tuple, Union, Iterable
  from deepchem.utils.typing import RDKitMol, RDKitAtom
  from deepchem.utils.molecule_feature_utils import one_hot_encode
label_desc: Use image node_id 2 for calling the ConvMolFeaturizer obj's underlying member method code with example usage: obj.featurize(datapoints, log_every_n) and returns: features