code: def grep_by_system(
      available_devices: Dict[AnyStr, List], system_name: OSName
  ) -> List[Dict]:
      """Search for simulators that use the target operating system."""
  
      def find_index_of_substr(
          search_field: List[AnyStr], target: AnyStr
      ) -> int:
          for i, item in enumerate(search_field):
              if target in item:
                  return i
          raise ValueError("Search field doesn't content target")
  
      keys = list(available_devices.keys())
  
      return available_devices[
          keys[find_index_of_substr(keys, system_name.value)]
      ]
  
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 2 for calling a global function with example usage: grep_by_system(available_devices, system_name) and returns: available_devices, i