code: async def tag(self, name: str, repo: str, *, tag: str = None) -> bool:
          
          params = {"repo": repo}
  
          if tag:
              params["tag"] = tag
  
          await self.docker._query(
              "images/{name}/tag".format(name=name),
              "POST",
              params=params,
              headers={"content-type": "application/json"},
          )
          return True
docs: Tag the given image so that it becomes part of a repository.
  
          Args:
              repo: the repository to tag in
              tag: the name for the new tag