docstr: Tests that frozen policies can't be changed.
docstr_tok: ["Tests","that","frozen","policies","ca","n't","be","changed","."]
code: def testFrozen(self):
      """Tests that frozen policies can't be changed."""
      p1 = tpu_sharding.ShardingPolicy()
      p1.freeze()
      with self.assertRaises(ValueError):
          p1.set_number_of_shards(17)
      with self.assertRaises(ValueError):
          p1.set_shard_dimension(22)
  
file_path: tensorflow-upstream/tensorflow/python/tpu/tpu_sharding_test.py
imports: from tensorflow.python.framework import tensor_shape
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import tpu_sharding
label_desc: Use image node_id 2 for calling the ShardingTest obj's underlying member method code with example usage: obj.testFrozen() without return types