def METHOD_NAME(
    metadata_path: Path, input_path: Path, output_path: Path
):
    """The decoder-integration test assumes a `test` namespace and `test` type.
    This encrypts the payload with the key specified in the metadata path. This
    test is run locally, so KMS is not used to encrypt the private key."""
    with metadata_path.open() as fp:
        metadata = json.load(fp)
    assert (
        len(metadata) == 1
    ), "only a single entry corresponding to the `test` namespace should exist"
    # the private_key_uri is relative from ingestion-beam root for testing
    ingestion_beam = resources.parent.parent.parent
    with (ingestion_beam / metadata[0]["private_key_uri"]).open("r") as fp:
        key = jwk.JWK(**json.load(fp))
    with input_path.open() as fp:
        lines = fp.readlines()
    encrypted = []
    for line in lines:
        data = json.loads(line)
        payload = encrypt(json.loads(b64decode(data["payload"])), key, "test")
        data["payload"] = b64encode(json.dumps(payload).encode()).decode()
        encrypted.append(data)
    with output_path.open("w") as fp:
        for line in encrypted:
            fp.write(json.dumps(line))
            fp.write("\n")