code: def tag(self, repository_tag, tags=[]):
          
          if not isinstance(repository_tag, six.string_types):
              raise TypeError('repository_tag must be a string')
  
          if not isinstance(tags, list):
              raise TypeError('tags must be a list.')
  
          if ':' in repository_tag:
              repository, tag = repository_tag.split(':')
              tags.append(tag)
          else:
              repository = repository_tag
  
              if not tags:
                  tags.append('latest')
  
          for tag in tags:
              repo_tag = "{0}:{1}".format(repository, tag)
  
              if repo_tag not in self.repo_tags:
                  logger.info("Tagging Image: {0} Repo Tag: {1}".format(self.identifier, repo_tag))
                  self.repo_tags = self.repo_tags + (repo_tag, )
  
                  # always going to force tags until a feature is added to allow users to specify.
                  try:
                      self.client.tag(self.id, repository, tag)
                  except:
                      self.client.tag(self.id, repository, tag, force=True)
docs: Tags image with one or more tags.
  
          Raises exception on failure.