code: def featurize_splif(
      frag1, frag2, contact_bins, pairwise_distances, ecfp_degree
  ):
      """Computes SPLIF featurization of fragment interactions binding pocket.
  
      For each contact range (i.e. 1 A to 2 A, 2 A to 3 A, etc.)
      compute a dictionary mapping (frag1_index_i, frag2_index_j)
      tuples --> (frag1_ecfp_i, frag2_ecfp_j) tuples. Return a
      list of such splif dictionaries.
  
      Parameters
      ----------
      frag1: Tuple
          A tuple of (coords, mol) returned by `load_molecule`.
      frag2: Tuple
          A tuple of (coords, mol) returned by `load_molecule`.
      contact_bins: np.ndarray
          Ranges of pair distances which are placed in separate bins.
      pairwise_distances: np.ndarray
          Array of pairwise fragment-fragment distances (Angstroms)
      ecfp_degree: int
          ECFP radius, the graph distance at which fragments are computed.
  
      Returns
      -------
      Dictionaries of SPLIF interactions suitable for `vectorize` or
      `voxelize`.
      """
      splif_dicts = []
      for i, contact_bin in enumerate(contact_bins):
          splif_dicts.append(
              compute_splif_features_in_range(
                  frag1,
                  frag2,
                  pairwise_distances,
                  contact_bin,
                  ecfp_degree,
              )
          )
  
      return splif_dicts
  
imports: import logging
  import itertools
  import numpy
  from deepchem.utils.hash_utils import hash_ecfp_pair
  from deepchem.utils.rdkit_utils import load_complex
  from deepchem.utils.rdkit_utils import compute_all_ecfp
  from deepchem.utils.rdkit_utils import MoleculeLoadException
  from deepchem.utils.rdkit_utils import compute_contact_centroid
  from deepchem.feat import ComplexFeaturizer
  from deepchem.utils.hash_utils import vectorize
  from deepchem.utils.voxel_utils import voxelize
  from deepchem.utils.voxel_utils import convert_atom_pair_to_voxel
  from deepchem.utils.geometry_utils import compute_pairwise_distances
  from deepchem.utils.geometry_utils import subtract_centroid
  from typing import Optional, Tuple, Dict, List
label_desc: Use image node_id 2 for calling a global function with example usage: featurize_splif(frag1, frag2, contact_bins, pairwise_distances, ecfp_degree) and returns: splif_dicts