def from_dict(cls, data_dict: _Dict[str, _Any]) -> "DictableDataClass":
        """
        Create class from a dictionary of string keys and values.

        Args:
            data_dict (:obj:`dict` of :obj:`str` and values): A nested dictionary of strings
                and values.
        """
        # Explicitly raise exception for unrecognized keys
        cls._validate_dict(data_dict)
        converter = _cattrs.Converter(forbid_extra_keys=True)
        converter.register_structure_hook(_torch.Tensor, lambda obj, type: obj)
        return converter.structure_attrs_fromdict(data_dict, cls)

        Create class from a dictionary of string keys and values.

        Args:
            data_dict (:obj:`dict` of :obj:`str` and values): A nested dictionary of strings
                and values.
        
coremltools/optimize/torch/_utils/python_utils.py