def build_id(reg, version=None):
    if (version is not None):
        return '{}:{}'.format(version, '-'.join(reg['label']))
    return '-'.join(reg['label'])
def build_id(reg, version=None):
    if (version is not None):
        return '{}:{}'.format(version, '-'.join(reg['label']))
    return '-'.join(reg['label'])