class_docstr: Describes how a :class:`jax.Array` is laid out across devices.
    
class_docstr_tok: ["Describes","how","a",":","class",":","`","jax.Array","`","is","laid","out","across","devices","."]
docstr: The set of devices in the :class:`Sharding` that are addressable by the
  current process.
docstr_tok: ["The","set","of","devices","in","the",":","class",":","`","Sharding","`","that","are","addressable","by","the","current","process","."]
code: def addressable_devices(self) -> set[Device]:
      """The set of devices in the :class:`Sharding` that are addressable by the
      current process.
      """
      # Add a fast path for single controller runtimes.
      if xb.process_count() == 1:
          return self.device_set
      return {
          d
          for d in self.device_set
          if d.process_index == d.client.process_index()
      }
  
file_path: jax/jax/_src/sharding.py
imports: from __future__ import annotations
  from collections.abc import Mapping, Sequence
  import functools
  from jax._src import util
  from jax._src import xla_bridge
  from jax._src.lib import xla_client
label_desc: Use image node_id 9 for calling the Sharding obj's underlying member method code with example usage: obj.addressable_devices() and returns: unknown, self