code: def compute_splif_features_in_range(
      frag1: Tuple,
      frag2: Tuple,
      pairwise_distances: np.ndarray,
      contact_bin: List,
      ecfp_degree: int = 2,
  ) -> Dict:
      """Computes SPLIF features for close atoms in molecular complexes.
  
      Finds all frag1 atoms that are > contact_bin[0] and <
      contact_bin[1] away from frag2 atoms. Then, finds the ECFP
      fingerprints for the contacting atoms. Returns a dictionary
      mapping (frag1_index_i, frag2_index_j) --> (frag1_ecfp_i,
      frag2_ecfp_j)
  
      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
      """
      contacts = np.nonzero(
          (pairwise_distances > contact_bin[0])
          & (pairwise_distances < contact_bin[1])
      )
      frag1_atoms = set([int(c) for c in contacts[0].tolist()])
  
      frag1_ecfp_dict = compute_all_ecfp(
          frag1[1], indices=frag1_atoms, degree=ecfp_degree
      )
      frag2_ecfp_dict = compute_all_ecfp(frag2[1], degree=ecfp_degree)
      splif_dict = {
          contact: (
              frag1_ecfp_dict[contact[0]],
              frag2_ecfp_dict[contact[1]],
          )
          for contact in zip(contacts[0], contacts[1])
      }
      return splif_dict
  
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 1 for calling a global function with example usage: compute_splif_features_in_range(frag1, frag2, pairwise_distances, contact_bin, ecfp_degree) and returns: splif_dict