<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def spin(compound, theta, around):
 """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. """

    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)