code: def parse_image_name(name):
      
      name = name or ""
      if '/' in name:
          repository, other = name.split('/')
      else:
          repository, other = None, name
  
      if ':' in other:
          name, version = other.split(':')
      else:
          name, version = other, 'latest'
  
      return repository, name, version
docs: parse the image name into three element tuple, like below:
      (repository, name, version)
      :param name: `class`:`str`, name
      :return: (repository, name, version)