code: def compute_neighbor_cell_map(N_x, N_y, N_z):
      """Compute neighbors of cells in grid.
  
      Parameters
      ----------
      N_x: int
        Number of grid cells in x-dimension.
      N_y: int
        Number of grid cells in y-dimension.
      N_z: int
        Number of grid cells in z-dimension.
  
      Returns
      -------
      neighbor_cell_map: dict
        Dict elements contain neighbor cell indices
  
      """
  
      # TODO(JSG): Implement non-PBC version.  For now this seems fine ..
      neighbor_cell_map = {}
      for x_ind in range(N_x):
          for y_ind in range(N_y):
              for z_ind in range(N_z):
                  neighbors = []
                  offsets = [-1, 0, +1]
                  # Note neighbors contains self!
                  for x_offset in offsets:
                      for y_offset in offsets:
                          for z_offset in offsets:
                              neighbors.append(
                                  (
                                      (x_ind + x_offset) % N_x,
                                      (y_ind + y_offset) % N_y,
                                      (z_ind + z_offset) % N_z,
                                  )
                              )
                  neighbor_cell_map[(x_ind, y_ind, z_ind)] = neighbors
      return neighbor_cell_map
  
file_path: deepchem/contrib/atomicconv/feat/atomicnet_coordinates.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import numpy
  from rdkit import Chem
  from deepchem.feat import Featurizer
  from deepchem.feat import ComplexFeaturizer
  from deepchem.utils import pad_array
label_desc: Use image node_id 3 for calling a global function with example usage: compute_neighbor_cell_map(N_x, N_y, N_z) and returns: neighbor_cell_map