class_docstr: Python wrapper for launch iOS RPC to simulator.
  
  mode : str
      Server mode. See RPCServerMode.
  
  host : str
      The tracker/proxy address.
  
  port : int
      The tracker/proxy port.
  
  key : str
      The key used to identify the device type in tracker.
class_docstr_tok: ["Python","wrapper","for","launch","iOS","RPC","to","simulator",".","mode",":","str","Server","mode",".","See","RPCServerMode",".","host",":","str","The","tracker\/proxy","address",".","port",":","int","The","tracker\/proxy","port",".","key",":","str","The","key","used","to","identify","the","device","type","in","tracker","."]
docstr: Boot the required simulator if there is no suitable booted simulator
  among the available simulators. If there is a suitable booted simulator,
  then take it as a simulator to which the iOS RPC application will be deployed.
docstr_tok: ["Boot","the","required","simulator","if","there","is","no","suitable","booted","simulator","among","the","available","simulators",".","If","there","is","a","suitable","booted","simulator",",","then","take","it","as","a","simulator","to","which","the","iOS","RPC","application","will","be","deployed","."]
code: def _boot_or_find_booted_device(self):
      """
      Boot the required simulator if there is no suitable booted simulator
      among the available simulators. If there is a suitable booted simulator,
      then take it as a simulator to which the iOS RPC application will be deployed.
      """
  
      target_system = OSName.iOS
      target_device_type = IOSDevice.iPhone
      available_devices = get_list_of_available_simulators()
      if not available_devices:
          raise ValueError("No devices available in this environment")
      target_devices = grep_by_system(available_devices, target_system)
      if not target_devices:
          raise ValueError(
              f"No available simulators for target system: {target_system.value}"
          )
      target_devices = grep_by_device(
          target_devices, target_device_type
      )
      if not target_devices:
          raise ValueError(
              f"No available simulators for target device type: {target_device_type.value}"
          )
  
      maybe_booted = check_booted_device(target_devices)
      if maybe_booted:
          self.external_booted_device = maybe_booted
      else:
          take_latest_model = True
          target_device = target_devices[-1 if take_latest_model else 0]
          boot_device(get_device_uid(target_device))
          ServerIOSLauncher.booted_devices.append(target_device)
  
imports: import os
  import json
  import time
  import threading
  import subprocess
  from enum import Enum
  from typing import Dict, List, AnyStr
label_desc: Use image node_id 6 for calling the ServerIOSLauncher obj's underlying member method code with example usage: obj._boot_or_find_booted_device() without return types