code: def spin(compound, theta, around):
      
      around = np.asarray(around).reshape(3)
      if np.array_equal(around, np.zeros(3)):
          raise ValueError('Cannot spin around a zero vector')
      center_pos = compound.center
      translate(compound, -center_pos)
      rotate(compound, theta, around)
      translate(compound, center_pos)
docs: Rotate a compound in place around an arbitrary vector.
  
      Parameters
      ----------
      compound : mb.Compound
          The compound being rotated.
      theta : float
          The angle by which to rotate the compound, in radians.
      around : np.ndarray, shape=(3,), dtype=float
          The axis about which to spin the compound.