def METHOD_NAME(extension_pack):
    if extension_pack:
        with zipfile.ZipFile(extension_pack) as z:
            with z.open('metadata.json') as f:
                return json.load(f)
    else:
        with open(SRC_DIR / 'metadata.json', 'r') as f:
            return json.load(f)