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: Merges the policy of another policy into the current policy.
  
  Args:
    other: The policy to merge into this one.
  
  Raises:
    ValueError: If this policy has been frozen and the merge conflicts with
    the frozen policy.
docstr_tok: ["Merges","the","policy","of","another","policy","into","the","current","policy",".","Args",":","other",":","The","policy","to","merge","into","this","one",".","Raises",":","ValueError",":","If","this","policy","has","been","frozen","and","the","merge","conflicts","with","the","frozen","policy","."]
code: def merge(self, other):
      """Merges the policy of another policy into the current policy.
  
      Args:
        other: The policy to merge into this one.
  
      Raises:
        ValueError: If this policy has been frozen and the merge conflicts with
        the frozen policy.
      """
      if other.number_of_shards is not None:
          self.set_number_of_shards(other.number_of_shards)
      if other.shard_dimension is not None:
          self.set_shard_dimension(other.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 11 for calling the ShardingPolicy obj's underlying member method code with example usage: obj.merge(other) without return types