def METHOD_NAME(  # pylint: disable=no-self-argument
    cls, values: Dict[str, Any]
) -> Dict[str, Any]:
    """Attempt to fill content_type if not provided."""
    if values.get("content_type"):
        return values
    name = cast(str, values.get("name", ""))
    if name.endswith(".json"):
        values["content_type"] = "application/json"
    elif name.endswith(".yaml") or name.endswith(".yml"):
        values["content_type"] = "text/yaml"
    return values