def METHOD_NAME(cls, dim_dict):
    """Validate the expected parameters and dimensions for this template."""
    if not isinstance(dim_dict, Dict):
        raise TypeError(
            f"Expected expected_parameters_dimensions to be a "
            f"dictionary but found {type(dim_dict)}"
        )
    for param_name, dim in dim_dict.items():
        if not isinstance(dim, sympy.Expr):
            try:
                dimension = getattr(u.dimensions, dim)
            except AttributeError:
                dimension_expr = sympy.sympify(dim)
                subs = (
                    (symbol, getattr(u.dimensions, str(symbol)))
                    for symbol in dimension_expr.free_symbols
                )
                dimension = dimension_expr.subs(subs)
            dim_dict[param_name] = dimension
    return dim_dict