code: def local_devices(
      process_index: int | None = None,
      backend: str | xla_client.Client | None = None,
      host_id: int | None = None,
  ) -> list[xla_client.Device]:
      """Like :py:func:`jax.devices`, but only returns devices local to a given process.
  
      If ``process_index`` is ``None``, returns devices local to this process.
  
      Args:
        process_index: the integer index of the process. Process indices can be
          retrieved via ``len(jax.process_count())``.
        backend: This is an experimental feature and the API is likely to change.
          Optional, a string representing the xla backend: ``'cpu'``, ``'gpu'``, or
          ``'tpu'``.
  
      Returns:
        List of Device subclasses.
      """
      if host_id is not None:
          warnings.warn(
              "The argument to jax.local_devices has been renamed from `host_id` to "
              "`process_index`. This alias will eventually be removed; please update "
              "your code."
          )
          process_index = host_id
      if process_index is None:
          process_index = get_backend(backend).process_index()
      if not (0 <= process_index < process_count(backend)):
          raise ValueError(f"Unknown process_index {process_index}")
      return [
          d
          for d in devices(backend)
          if d.process_index == process_index
      ]
  
imports: from __future__ import annotations
  from __future__ import annotations
  from collections.abc import Mapping
  import dataclasses
  from functools import lru_cache, partial
  import importlib
  import json
  import logging
  import os
  import pkgutil
  import platform
  import sys
  import threading
  from typing import Any, Callable, Union
  import warnings
  from jax._src import config
  from jax._src import distributed
  from jax._src import traceback_util
  from jax._src import util
  from jax._src import hardware_utils
  from jax._src.cloud_tpu_init import maybe_import_libtpu
  from jax._src.lib import cuda_versions
  from jax._src.lib import xla_client
  from jax._src.lib import xla_extension
  from jax._src.lib import xla_extension_version
label_desc: Use image node_id 30 for calling a global function with example usage: local_devices(process_index, backend, host_id) and returns: unknown