Ref : https://github.com/python/cpython/pull/25174

https://github.com/localstack/localstack/blob/5a5edcd9d9ccbd6a56f23d71e3a1131b8c814996/localstack/utils/common.py#L324
if is_mac_os():
        return 'osx'
    if is_alpine():
        return 'alpine'
    if is_linux():
        return 'linux'
    if is_windows():
        return 'windows'
    raise Exception('Unable to determine system architecture')
def is_command_available(cmd):
    try:
        run('which %s' % cmd, print_error=False)
        return True
    except Exception:
        return False
def short_uid():
    return str(uuid.uuid4())[0:8]
def long_uid():
    return str(uuid.uuid4())
def json_safe(item):
    """ return a copy of the given object (e.g., dict) that is safe for JSON dumping """
    try:
        return json.loads(json.dumps(item, cls=CustomEncoder))
    except Exception:
        item = fix_json_keys(item)
        return json.loads(json.dumps(item, cls=CustomEncoder))
def fix_json_keys(item):