code: def _deserialize_sharding(
      s: ser_flatbuf.Sharding,
  ) -> _export.Sharding:
      kind = s.Kind()
      if kind == ser_flatbuf.ShardingKind.unspecified:
          return None
  
      if kind == ser_flatbuf.ShardingKind.hlo_sharding:
          proto_str = s.HloShardingProtoAsNumpy().tobytes()
          proto = xla_client.OpSharding()
          proto.ParseFromString(proto_str)
  
          return xla_client.HloSharding.from_proto(proto)
  
      assert False, kind
  
imports: from typing import Callable, TypeVar
  from collections.abc import Sequence
  from jax._src import core
  from jax._src import dtypes
  from jax._src import effects
  from jax._src import tree_util
  from jax._src.lib import xla_client
  from jax.experimental.export import serialization_generated
  from jax.experimental.export import _export
  from jax.experimental import export
  import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: _deserialize_sharding(s) and returns: None, xla_client