def METHOD_NAME(dpath: str) -> bytes:
    data = BytesIO()
    with zipfile.ZipFile(data, "w", zipfile.ZIP_DEFLATED) as zipf:
        for root, dirs, files in os.walk(dpath):
            for file in files:
                zipf.write(
                    os.path.join(root, file),
                    os.path.relpath(
                        os.path.join(root, file), os.path.join(dpath)
                    ),
                )
    return data.getvalue()