def get_connected_devices(device_type: DeviceType) -> _List[_Type["Device"]]:
        """
        Retrieve a list of connected devices of a specified type.

        This function uses the DeviceCtl utility to fetch all accessible devices and filters them
        based on the following criteria:
        1. The device is in a connected state
        2. The device matches the specified device_type

        Parameters
        ----------
        device_type : DeviceType
            The type of device to filter for (e.g., iPhone, iPad, Apple TV).

        Returns
        -------
        List[Device]
        """

        def is_device_connected(device: Device) -> bool:
            return device.state == DeviceState.CONNECTED and device.type == device_type

        return [device for device in Device.get_devices() if is_device_connected(device=device)]

        Retrieve a list of connected devices of a specified type.

        This function uses the DeviceCtl utility to fetch all accessible devices and filters them
        based on the following criteria:
        1. The device is in a connected state
        2. The device matches the specified device_type

        Parameters
        ----------
        device_type : DeviceType
            The type of device to filter for (e.g., iPhone, iPad, Apple TV).

        Returns
        -------
        List[Device]
        
coremltools/models/ml_program/experimental/remote_device.py