def METHOD_NAME(test_data_dir, offline_keys):
    filename = "root.json"
    filepath = Path(test_data_dir) / filename
    timestamp = datetime.now(timezone.utc)
    # avoid failing test due to expired role
    expiration = timestamp + timedelta(days=365)
    json_role = {
        "signatures": {},
        "signed": {
            "delegations": {
                "key_mgr": {
                    "pubkeys": [offline_keys["key_mgr"][0]],
                    "threshold": 1,
                },
                "root": {
                    "pubkeys": [offline_keys["root"][0]],
                    "threshold": 1,
                },
            },
            "expiration": expiration.strftime('%Y-%m-%dT%H:%M:%SZ'),
            "metadata_spec_version": "0.6.0",
            "timestamp": timestamp.strftime('%Y-%m-%dT%H:%M:%SZ'),
            "type": "root",
            "version": 1,
        },
    }
    signature = libmamba_api.sign(
        json.dumps(json_role["signed"], indent=2), offline_keys["root"][1]
    )
    json_role["signatures"][offline_keys["root"][0]] = {"signature": signature}
    with open(filepath, "w") as f:
        json.dump(json_role, f, indent=2)
    return filepath