code: def testDefaultDeviceInsideFunctionWithScope(
      self, distribution, run_functions_eagerly
  ):
      def_function.run_functions_eagerly(run_functions_eagerly)
      try:
          worker = distribution.extended.worker_devices[0]
      except RuntimeError:
          worker = None
      expected_device = (
          device_util.canonicalize("cpu:0", worker)
          if run_functions_eagerly
          else ""
      )
      with distribution.scope():
          with ops.device_v2("cpu:0"):
  
              @def_function.function
              def add():
                  one = array_ops.ones([])
                  self.assertEqual(expected_device, one.device)
                  return one + 1
  
              add()
  
imports: from absl.testing import parameterized
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import device_util
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import values
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import config
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import flags
  from tensorflow.python.saved_model import save_context
  from tensorflow.python.saved_model import save_options
label_desc: Use image node_id 2 for calling the TFFunctionTest obj's underlying member method code with example usage: obj.testDefaultDeviceInsideFunctionWithScope(distribution, run_functions_eagerly) and returns: unknown