code: def get_intervals(l):
      """For list of lists, gets the cumulative products of the lengths
  
      Note that we add 1 to the lengths of all lists (to avoid an empty list
      propagating a 0).
  
      Parameters
      ----------
      l: list of lists
          Returns the cumulative product of these lengths.
  
      Examples
      --------
      >>> dc.feat.graph_features.get_intervals([[1], [1, 2], [1, 2, 3]])
      [1, 3, 12]
  
      >>> dc.feat.graph_features.get_intervals([[1], [], [1, 2], [1, 2, 3]])
      [1, 1, 3, 12]
  
      """
      intervals = len(l) * [0]
      # Initalize with 1
      intervals[0] = 1
      for k in range(1, len(l)):
          intervals[k] = (len(l[k]) + 1) * intervals[k - 1]
  
      return intervals
  
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 3 for calling a global function with example usage: get_intervals(l) and returns: intervals