async def predict(
        self,
        inputs: _Dict[str, _np.array],
    ) -> _Dict[str, _np.array]:
        """
        Perform a prediction using the remote ML model.

        This asynchronous method sends input data to the remote model, executes the prediction,
        and returns the results.

        Parameters
        ----------
        inputs : Dict[str, np.array]
            A dictionary mapping input names to numpy arrays containing the input data for the prediction.

        Returns
        -------
        Dict[str, np.array]
            A dictionary mapping output names to numpy arrays containing the prediction results.
        """
        if self._state == _RemoteMLModelService.State.Unloaded:
            message = f"The model with ID {self.model_id} and {self.compute_units.value} is not currently loaded."
            raise _DeviceCtlError(error_code=-32001, message=message)

        (values, data_file_path) = self._prepare_data_for_transfer(values=inputs)

        params = {
            "modelID": self._model_id,
            "computeUnits": self._compute_units.name,
            "inputs": values,
        }

        (result, resource) = await self._service.call_method(
            name="MLModelService.Prediction",
            params=params,
            resource=data_file_path,
        )

        self._validate_result(result=result)

        outputs = result.get("outputs", None)
        if not isinstance(outputs, _Mapping):
            raise TypeError(
                f"Expected outputs to be a mapping type (e.g., dict), but got {type(outputs).__name__}"
            )

        values: _Dict[str, _np.array] = {}
        if resource is None:
            raise ValueError("Required resource for tensor data storage is missing.")

        with open(resource, "rb") as fp:
            for name, value in outputs.items():
                if not isinstance(value, _Mapping):
                    raise TypeError(
                        f"Expected output to be a mapping type (e.g., dict), but got {type(value).__name__}"
                    )

                descriptor = _TensorDescriptor.from_dict(value)
                array = descriptor.to_array(fp)
                values[name] = array

        self._last_predict_duration_in_nano_seconds = result.get("duration", None)

        return values

        Perform a prediction using the remote ML model.

        This asynchronous method sends input data to the remote model, executes the prediction,
        and returns the results.

        Parameters
        ----------
        inputs : Dict[str, np.array]
            A dictionary mapping input names to numpy arrays containing the input data for the prediction.

        Returns
        -------
        Dict[str, np.array]
            A dictionary mapping output names to numpy arrays containing the prediction results.
        
coremltools/models/ml_program/experimental/remote_device.py