def METHOD_NAME(parameters: Dict) -> RunType:
    """
    Determine run type from the VASP parameters dict.
    This is adapted from pymatgen to be far less unstable
    Args:
        parameters: Dictionary of VASP parameters from vasprun.xml.
    Returns:
        The run type.
    Warning:
        VASP mangles the LDAU* fields in the parameters field. If you're not using the
        TaskDocument.run_type, copy over LDAU* fields from the incar rather than trust
        parameters.
    """
    is_hubbard = "+U" if parameters.get("LDAU", False) else ""
    def _variant_equal(v1, v2) -> bool:
        """Check two strings equal."""
        if isinstance(v1, str) and isinstance(v2, str):
            return v1.strip().upper() == v2.strip().upper()
        return v1 == v2
    # This is to force an order of evaluation
    for functional_class in ["HF", "VDW", "METAGGA", "GGA"]:
        for special_type, params in _RUN_TYPE_DATA[functional_class].items():
            if all(
                _variant_equal(parameters.get(param, None), value)
                for param, value in params.items()
            ):
                return RunType(f"{special_type}{is_hubbard}")
    return RunType(f"LDA{is_hubbard}")