code: def subtract_centroid(
      coordinates: np.ndarray, centroid: np.ndarray
  ) -> np.ndarray:
      """Subtracts centroid from each coordinate.
  
      Subtracts the centroid, a numpy array of dim 3, from all coordinates
      of all atoms in the molecule
  
      Note that this update is made in place to the array it's applied to.
  
      Parameters
      ----------
      coordinates: np.ndarray
          A numpy array of shape `(N, 3)`, where `N` is the number of atoms.
      centroid: np.ndarray
          A numpy array of shape `(3,)`
  
      Returns
      -------
      coordinates: np.ndarray
          A numpy array of shape `(3,)`, where `3` is (x,y,z).
      """
      coordinates -= np.transpose(centroid)
      return coordinates
  
file_path: deepchem/deepchem/utils/geometry_utils.py
imports: import numpy
  from scipy.spatial.distance import cdist
  from copy import deepcopy
label_desc: Use image node_id 9 for calling a global function with example usage: subtract_centroid(coordinates, centroid) and returns: coordinates