code: def is_op_sharding_replicated(
      op: xc.OpSharding | xc.HloSharding,
  ) -> bool:
      if isinstance(op, xc.OpSharding):
          op = xc.HloSharding.from_proto(op)
      if op.num_devices() == 1:
          return True
      return op.is_replicated()
  
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 2 for calling a global function with example usage: is_op_sharding_replicated(op) and returns: op, True