code: def op_sharding_to_indices(
      op_sharding: xc.HloSharding,
      shape: Sequence[int],
      num_devices: int,
  ) -> tuple[tuple[slice, ...], ...]:
      indices = op_sharding_to_numpy_indices(
          op_sharding, shape, num_devices
      )
      return tuple(indices.flat)
  
file_path: jax/jax/_src/op_shardings.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import itertools
  from typing import Union
  import numpy
  from jax._src.lib import xla_client
label_desc: Use image node_id 5 for calling a global function with example usage: op_sharding_to_indices(op_sharding, shape, num_devices) and returns: tuple