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

        Parameters
        ----------
        dict: Dict[str, Any]
            A dictionary containing 'offset' and 'size' keys.

        Returns
        -------
        TensorStorage
            A new TensorStorage instance.
        """
        return _TensorStorage(
            offset=dict.get("offset", 0),
            size=dict.get("size", 0),
        )

        Create a TensorStorage instance from a dictionary.

        Parameters
        ----------
        dict: Dict[str, Any]
            A dictionary containing 'offset' and 'size' keys.

        Returns
        -------
        TensorStorage
            A new TensorStorage instance.
        
coremltools/models/ml_program/experimental/remote_device.py