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

        This method creates a dictionary containing all the attributes of the TensorDescriptor,
        with keys matching the attribute names.

        Returns
        -------
        Dict[str, Any]
            A dictionary representation of the TensorDescriptor with the following keys:
                - 'shape': List[int], the shape of the tensor
                - 'strides': List[int], the strides of the tensor
                - 'dataType': str, the string representation of the data type
                - 'storage': Dict, the dictionary representation of the TensorStorage
        """
        result = {}
        result["shape"] = self.shape
        result["strides"] = self.strides
        result["dataType"] = self.data_type.value
        result["storage"] = self.storage.as_dict()

        return result

        Convert the TensorDescriptor to a dictionary representation.

        This method creates a dictionary containing all the attributes of the TensorDescriptor,
        with keys matching the attribute names.

        Returns
        -------
        Dict[str, Any]
            A dictionary representation of the TensorDescriptor with the following keys:
                - 'shape': List[int], the shape of the tensor
                - 'strides': List[int], the strides of the tensor
                - 'dataType': str, the string representation of the data type
                - 'storage': Dict, the dictionary representation of the TensorStorage
        
coremltools/models/ml_program/experimental/remote_device.py