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

https://github.com/localstack/localstack/blob/5a5edcd9d9ccbd6a56f23d71e3a1131b8c814996/localstack/utils/common.py#L324
folder = new_tmp_file()
    rm_rf(folder)
    mkdir(folder)
    return folder
def is_ip_address(addr):
    try:
        socket.inet_aton(addr)
        return True
    except socket.error:
        return False
def is_zip_file(content):
    stream = BytesIO(content)
    return zipfile.is_zipfile(stream)
def unzip(path, target_dir, overwrite=True):
    is_in_alpine = is_alpine()
    if is_in_alpine:
        
        flags = '-o' if overwrite else ''
        flags += ' -q'
        try:
            return run('cd %s; unzip %s %s' % (target_dir, flags, path), print_error=False)
        except Exception as e:
            error_str = truncate(str(e), max_length=200)
            LOG.info('Unable to use native "unzip" command (using fallback mechanism): %s' % error_str)
    try:
        zip_ref = zipfile.ZipFile(path, 'r')
    except Exception as e:
        LOG.warning('Unable to open zip file: %s: %s' % (path, e))
        raise e
    def _unzip_file_entry(zip_ref, file_entry, target_dir):