code: def get_contact_atom_indices(
      fragments: List, cutoff: float = 4.5
  ) -> List:
      """Compute the atoms close to contact region.
  
      Molecular complexes can get very large. This can make it unwieldy to
      compute functions on them. To improve memory usage, it can be very
      useful to trim out atoms that aren't close to contact regions. This
      function computes pairwise distances between all pairs of molecules
      in the molecular complex. If an atom is within cutoff distance of
      any atom on another molecule in the complex, it is regarded as a
      contact atom. Otherwise it is trimmed.
  
      Parameters
      ----------
      fragments: List
          As returned by `rdkit_util.load_complex`, a list of tuples of
          `(coords, mol)` where `coords` is a `(N_atoms, 3)` array and `mol`
          is the rdkit molecule object.
      cutoff: float
          The cutoff distance in angstroms.
  
      Returns
      -------
      A list of length `len(molecular_complex)`. Each entry in this list
      is a list of atom indices from that molecule which should be kept, in
      sorted order.
      """
      # indices of atoms to keep
      keep_inds: List[Set] = [set([]) for _ in fragments]
      for ind1, ind2 in itertools.combinations(
          range(len(fragments)), 2
      ):
          frag1, frag2 = fragments[ind1], fragments[ind2]
          pairwise_distances = compute_pairwise_distances(
              frag1[0], frag2[0]
          )
          # contacts is of form (x_coords, y_coords), a tuple of 2 lists
          contacts = np.nonzero((pairwise_distances < cutoff))
          # contacts[0] is the x_coords, that is the frag1 atoms that have
          # nonzero contact.
          frag1_atoms = set([int(c) for c in contacts[0].tolist()])
          # contacts[1] is the y_coords, the frag2 atoms with nonzero contacts
          frag2_atoms = set([int(c) for c in contacts[1].tolist()])
          keep_inds[ind1] = keep_inds[ind1].union(frag1_atoms)
          keep_inds[ind2] = keep_inds[ind2].union(frag2_atoms)
      keep_ind_lists = [sorted(list(keep)) for keep in keep_inds]
      return keep_ind_lists
  
imports: import os
  import logging
  import itertools
  import numpy
  from io import StringIO
  from deepchem.utils.pdbqt_utils import pdbqt_to_pdb
  from deepchem.utils.pdbqt_utils import convert_mol_to_pdbqt
  from deepchem.utils.pdbqt_utils import convert_protein_to_pdbqt
  from deepchem.utils.geometry_utils import compute_pairwise_distances
  from deepchem.utils.geometry_utils import compute_centroid
  from deepchem.utils.fragment_utils import MolecularFragment
  from deepchem.utils.fragment_utils import MoleculeLoadException
  from typing import Any, List, Sequence, Tuple, Set, Optional, Dict, Union
  from deepchem.utils.typing import OneOrMany, RDKitMol
label_desc: Use image node_id 15 for calling a global function with example usage: get_contact_atom_indices(fragments, cutoff) and returns: keep_ind_lists