class_docstr: An object use to hold the sharding policy for a Tensor.
class_docstr_tok: ["An","object","use","to","hold","the","sharding","policy","for","a","Tensor","."]
code: def __str__(self):
      if self.number_of_shards is None or self.shard_dimension is None:
          return "ShardingPolicy(unset)"
      else:
          return "ShardingPolicy(%d shards dimension %d)" % (
              self.number_of_shards,
              self.shard_dimension,
          )
  
file_path: tensorflow-upstream/tensorflow/python/tpu/tpu_sharding.py
imports: from tensorflow.python.framework import tensor_shape
label_desc: Use image node_id 2 for calling the ShardingPolicy obj's underlying member method code with example usage: obj.__str__() and returns: str, unknown