code: def features_to_id(features, intervals):
      """Convert list of features into index using spacings provided in intervals
  
      Parameters
      ----------
      features: list
          List of features as returned by `get_feature_list()`
      intervals: list
          List of intervals as returned by `get_intervals()`
  
      Returns
      -------
      id: int
          The index in a feature vector given by the given set of features.
      """
      id = 0
      for k in range(len(intervals)):
          id += features[k] * intervals[k]
  
      # Allow 0 index to correspond to null molecule 1
      id = id + 1
      return id
  
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 6 for calling a global function with example usage: features_to_id(features, intervals) and returns: id