def METHOD_NAME(self, content: typing.Any) -> bytes:
    assert yaml is not None, "`pyyaml` must be installed to use OpenAPIResponse."
    assert isinstance(
        content, dict
    ), "The schema passed to OpenAPIResponse should be a dictionary."
    return yaml.dump(content, default_flow_style=False).encode("utf-8")