def __setstate__(self, d: Dict[(str, Any)]) -> None:
    from omegaconf import DictConfig
    from omegaconf._utils import is_generic_dict, is_generic_list
    if isinstance(self, DictConfig):
        key_type = d['_metadata'].key_type
        if (key_type is None):
            key_type = Any
            d['_metadata'].key_type = key_type
    element_type = d['_metadata'].element_type
    if (element_type is None):
        element_type = Any
        d['_metadata'].element_type = element_type
    ref_type = d['_metadata'].ref_type
    if is_container_annotation(ref_type):
        if is_generic_dict(ref_type):
            d['_metadata'].ref_type = Dict[(key_type, element_type)]
        elif is_generic_list(ref_type):
            d['_metadata'].ref_type = List[element_type]
        else:
            assert False
    d['_flags_cache'] = None
    self.__dict__.update(d)
def __setstate__(self, d: Dict[(str, Any)]) -> None:
    from omegaconf import DictConfig
    from omegaconf._utils import is_generic_dict, is_generic_list
    if isinstance(self, DictConfig):
        key_type = d['_metadata'].key_type
        if (key_type is None):
            key_type = Any
            d['_metadata'].key_type = key_type
    element_type = d['_metadata'].element_type
    if (element_type is None):
        element_type = Any
        d['_metadata'].element_type = element_type
    ref_type = d['_metadata'].ref_type
    if is_container_annotation(ref_type):
        if is_generic_dict(ref_type):
            d['_metadata'].ref_type = Dict[(key_type, element_type)]
        elif is_generic_list(ref_type):
            d['_metadata'].ref_type = List[element_type]
        else:
            assert False
    d['_flags_cache'] = None
    self.__dict__.update(d)