def as_dict(
        self,
    ) -> _Dict[str, _Any]:
        """
        Convert the TensorStorage to a dictionary.

        Returns
        -------
        Dict[str, Any]
            A dictionary representation of the TensorStorage.
        """
        return {"offset": self.offset, "size": self.size}

        Convert the TensorStorage to a dictionary.

        Returns
        -------
        Dict[str, Any]
            A dictionary representation of the TensorStorage.
        
coremltools/models/ml_program/experimental/remote_device.py