def install_and_launch_app(
        device: Device,
        app_path: _Path,
        working_directory: _Path,
    ) -> _AppSession:
        """
        Install and launch an application on the specified device in a single operation.

        This method combines the process of installing an application and launching it
        on the target device. It first installs the app using the provided app path,
        and then immediately launches the newly installed application.

        Parameters
        ----------
        device : Device
            The target device on which to install and launch the application.

        app_path : Path
            The path to the application file (.ipa or .app) to be installed.

        Returns
        -------
        _AppSession:
            An _AppSession object representing the launched application session.
            This object typically contains:
            - process: The subprocess object for the running application.
            - device: The Device object on which the app was installed and launched.
            - bundle_identifier: The bundle ID of the installed and launched application.
            - database_uuid: The database UUID of the installed application.

        """
        installation_info = _DeviceCtl.install_app(device=device, app_path=app_path)

        return _DeviceCtl.launch_app(
            device=device,
            installation_info=installation_info,
            working_directory=working_directory,
        )

        Install and launch an application on the specified device in a single operation.

        This method combines the process of installing an application and launching it
        on the target device. It first installs the app using the provided app path,
        and then immediately launches the newly installed application.

        Parameters
        ----------
        device : Device
            The target device on which to install and launch the application.

        app_path : Path
            The path to the application file (.ipa or .app) to be installed.

        Returns
        -------
        _AppSession:
            An _AppSession object representing the launched application session.
            This object typically contains:
            - process: The subprocess object for the running application.
            - device: The Device object on which the app was installed and launched.
            - bundle_identifier: The bundle ID of the installed and launched application.
            - database_uuid: The database UUID of the installed application.

        
coremltools/models/ml_program/experimental/remote_device.py