parse the image name into three element tuple, like below:
    (repository, name, version)
    :param name: `class`:`str`, name
    :return: (repository, name, version)

def parse_image_name(name):
    """
    parse the image name into three element tuple, like below:
    (repository, name, version)
    :param name: `class`:`str`, name
    :return: (repository, name, version)
    """
    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