<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(self, by):
 """Translate the Compound by a vector Parameters by : np.ndarray, shape=(3,), dtype=float """

        new_positions = _translate(self.xyz_with_ports, by)
        self.xyz_with_ports = new_positions