class_docstr: A class to support adding sharding attributes to Ops.
  
  Use the factory constructors and then call apply_to_tensor:
    Sharding.replicate().apply_to_tensor(tensor)
code: def _get_or_create_tuple_proto(self, op):
      try:
          attr = op.get_attr("_XlaSharding")
          proto = xla_data_pb2.OpSharding()
          proto.ParseFromString(attr)
          return proto
      except ValueError:
          return self._create_tuple_proto(len(op.outputs))
  
imports: import numpy
  from tensorflow.compiler.tf2xla.python import xla
  from local_xla.xla import xla_data_pb2
  from tensorflow.core.framework import attr_value_pb2
label_desc: Use image node_id 12 for calling the Sharding obj's underlying member method code with example usage: obj._get_or_create_tuple_proto(op) and returns: proto, self