def dict_validator(v) -> dict:
    if isinstance(v, dict):
        return v
    try:
        return dict(v)
    except TypeError as e:
        raise TypeError(f'value is not a valid dict, got {display_as_type(v)}') from e
def dict_validator(v) -> dict:
    if isinstance(v, dict):
        return v
    try:
        return dict(v)
    except TypeError as e:
        raise TypeError(f'value is not a valid dict, got {display_as_type(v)}') from e