def create_tag_json(user_agent):
    props = {
        'last_update': int(time.mktime(datetime.datetime.utcnow().timetuple()))
    }
    ua = dict(RE_USER_AGENT.findall(user_agent))
    if 'docker' in ua:
        props['docker_version'] = ua['docker']
    if 'go' in ua:
        props['docker_go_version'] = ua['go']
    for k in ['arch', 'kernel', 'os']:
        if ua in k:
            props[k] = ua[k].lower()
    return json.dumps(props)
dataset/ETHPy150Open docker/docker-registry/docker_registry/tags.py/create_tag_json/swapped operands of `in`