<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def translate(compound, pos):
 """Translate a compound by a vector. Parameters compound : mb.Compound The compound being translated. pos : np.ndarray, shape=(3,), dtype=float The vector to translate the compound by. """

    atom_positions = compound.xyz_with_ports
    atom_positions = Translation(pos).apply_to(atom_positions)
    compound.xyz_with_ports = atom_positions