'Restart a container. Similar to the ``docker restart`` command.
Args:
container (str or dict): The container to restart. If a dict, the
``Id`` key is used.
timeout (int): Number of seconds to try to stop for before killing
the container. Once killed it will then be restarted. Default
is 10 seconds.
Raises:
:py:class:`docker.errors.APIError`
If the server returns an error.'

@utils.check_resource('container')
def restart(self, container, timeout=10):

    params = {'t': timeout}
    url = self._url('/containers/{0}/restart', container)
    res = self._post(url, params=params)
    self._raise_for_status(res)
