code: def boxes_to_atoms(
      coords: np.ndarray, boxes: List[CoordinateBox]
  ) -> Dict[CoordinateBox, List[int]]:
      """Maps each box to a list of atoms in that box.
  
      Given the coordinates of a macromolecule, and a collection of boxes,
      returns a dictionary which maps boxes to the atom indices of the
      atoms in them.
  
      Parameters
      ----------
      coords: np.ndarray
          A numpy array of shape `(N, 3)`
      boxes: list
          List of `CoordinateBox` objects.
  
      Returns
      -------
      Dict[CoordinateBox, List[int]]
          A dictionary mapping `CoordinateBox` objects to lists of atom indices.
      """
      mapping = {}
      for box_ind, box in enumerate(boxes):
          box_atoms = []
          for atom_ind in range(len(coords)):
              atom = coords[atom_ind]
              if atom in box:
                  box_atoms.append(atom_ind)
          mapping[box] = box_atoms
      return mapping
  
file_path: deepchem/deepchem/feat/binding_pocket_features.py
imports: import numpy
  import logging
  from typing import Dict, List
  from deepchem.feat import Featurizer
  from deepchem.utils.coordinate_box_utils import CoordinateBox
  from deepchem.utils.rdkit_utils import load_molecule
label_desc: Use image node_id 1 for calling a global function with example usage: boxes_to_atoms(coords, boxes) and returns: mapping