keras/src/dtype_policies/dtype_policy_map.py/DTypePolicyMap/__init__
class DTypePolicyMap:    def __init__(self, default_policy=None, policy_map=None):
        if isinstance(default_policy, DTypePolicyMap):
            raise ValueError("`default_policy` cannot be a `DTypePolicyMap`.")
        if policy_map is not None and not isinstance(policy_map, dict):
            raise TypeError(
                "If specified, `policy_map` must be a dict. "
                f"Received: policy_map={policy_map} of type {type(policy_map)}"
            )
        self._default_policy_arg = default_policy
        self._default_policy = dtype_policies.get(default_policy)
        self._policy_map = policy_map or dict()