def METHOD_NAME(query_params: dict[str, Any]) -> dict[str, Any]:
    try:
        template_params = json.loads(query_params.get("templateParams") or "{}")
    except json.JSONDecodeError:
        logger.warning(
            "Invalid template parameter %s specified. Defaulting to empty dict",
            str(query_params.get("templateParams")),
        )
        template_params = {}
    return template_params