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","."]
docstr: Returns the number of shards in the policy or None if unspecified.
docstr_tok: ["Returns","the","number","of","shards","in","the","policy","or","None","if","unspecified","."]
code: def number_of_shards(self):
      """Returns the number of shards in the policy or None if unspecified."""
      return self._number_of_shards
  
file_path: tensorflow-upstream/tensorflow/python/tpu/tpu_sharding.py
imports: from tensorflow.python.framework import tensor_shape
label_desc: Use image node_id 5 for calling the ShardingPolicy obj's underlying member method code with example usage: obj.number_of_shards() and returns: self