code: def testCreateCriticalSection(self):
      cs = critical_section_ops.CriticalSection(shared_name="cs")
      v = resource_variable_ops.ResourceVariable(0.0, name="v")
  
      def fn(a, b):
          c = v.value()
          with ops.control_dependencies([c]):
              nv = v.assign_add(a * b)
              with ops.control_dependencies([nv]):
                  return array_ops.identity(c)
  
      num_concurrent = 100
      r = [
          cs.execute(lambda: fn(1.0, 2.0))
          for _ in range(num_concurrent)
      ]
      self.evaluate(v.initializer)
      r_value = self.evaluate(r)
      self.assertAllClose(
          [2.0 * i for i in range(num_concurrent)], sorted(r_value)
      )
  
imports: import itertools
  from absl.testing import parameterized
  from tensorflow.python.data.experimental.ops import prefetching_ops
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_v2_toggles
  from tensorflow.python.ops import critical_section_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 1 for calling the CriticalSectionTest obj's underlying member method code with example usage: obj.testCreateCriticalSection() and returns: array_ops