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)
docstr: Do not use this constructor; use the factory functions below.
docstr_tok: ["Do","not","use","this","constructor",";","use","the","factory","functions","below","."]
code: def __init__(self, proto=None):
      """Do not use this constructor; use the factory functions below."""
      self._proto = proto
  
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 1 to create a new Sharding object from inherited base classes: object with example: obj = Sharding(proto)