def from_dict(
        dict: _Dict[str, _Any],
    ) -> _Type["_TensorDescriptor"]:
        """
        Create a TensorDescriptor instance from a dictionary.

        Parameters
        ----------
        dict: Dict[str, Any]
            A dictionary containing the TensorDescriptor attributes.

        Returns
        -------
        TensorDescriptor
            A new TensorDescriptor instance created from the dictionary data.
        """
        return _TensorDescriptor(
            shape=dict.get("shape", []),
            strides=dict.get("strides", []),
            data_type=_TensorDescriptor.DataType(
                dict.get("dataType", _TensorDescriptor.DataType.Float32.value)
            ),
            storage=_TensorStorage.from_dict(dict.get("storage", {})),
        )

        Create a TensorDescriptor instance from a dictionary.

        Parameters
        ----------
        dict: Dict[str, Any]
            A dictionary containing the TensorDescriptor attributes.

        Returns
        -------
        TensorDescriptor
            A new TensorDescriptor instance created from the dictionary data.
        
coremltools/models/ml_program/experimental/remote_device.py