<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tag(self, image, repository, tag=None, force=False):
 """ Tag an image into a repository. Similar to the ``docker tag`` command. Args: image (str):
 The image to tag repository (str):
 The repository to set for the tag tag (str):
 The tag name force (bool):
 Force Returns: (bool):
 ``True`` if successful Raises: :py:class:`docker.errors.APIError` If the server returns an error. Example: force=True) """

        params = {
            'tag': tag,
            'repo': repository,
            'force': 1 if force else 0
        }
        url = self._url("/images/{0}/tag", image)
        res = self._post(url, params=params)
        self._raise_for_status(res)
        return res.status_code == 201