docstr: Read values from graph collections inside of defun.
code: def testCollectionValueAccess(self):
      """Read values from graph collections inside of defun."""
      with ops.Graph().as_default() as g:
          with self.session(graph=g):
              x = 2
              y = 5
              ops.add_to_collection("x", x)
              ops.add_to_collection("y", y)
  
              @polymorphic_function.function
              def fn():
                  x_const = constant_op.constant(
                      ops.get_collection("x")[0]
                  )
                  y_const = constant_op.constant(
                      ops.get_collection("y")[0]
                  )
                  z = math_ops.add(x_const, y_const)
                  ops.add_to_collection("z", 7)
                  return z
  
              self.assertEqual(7, int(self.evaluate(fn())))
              self.assertEqual(ops.get_collection("x"), [2])
              self.assertEqual(ops.get_collection("y"), [5])
              self.assertEqual(ops.get_collection("z"), [])
  
file_path: tensorflow/tensorflow/python/eager/polymorphic_function/collection_test.py
imports: from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the FunctionCollectionTest obj's underlying member method code with example usage: obj.testCollectionValueAccess() and returns: z