<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pause(self, container):
 """ Pauses all processes within a container. Args: container (str):
 The container to pause Raises: :py:class:`docker.errors.APIError` If the server returns an error. """

        url = self._url('/containers/{0}/pause', container)
        res = self._post(url)
        self._raise_for_status(res)