code: def _apply(self, defun=False, execution_mode=None):
      device, data_format = resnet50_test_util.device_and_data_format()
      model = resnet50.ResNet50(data_format)
      if defun:
          model.call = tf.function(model.call)
      with tf.device(device), context.execution_mode(execution_mode):
          images, _ = resnet50_test_util.random_batch(2, data_format)
          output = model(images, training=False)
          context.async_wait()
      self.assertEqual((2, 1000), output.shape)
  
imports: import gc
  import os
  import tempfile
  import time
  import tensorflow
  from tensorflow.python.client import device_lib
  from tensorflow.python.eager import context
  from tensorflow.python.eager import record
  from tensorflow.python.eager.benchmarks.resnet50 import resnet50
  from tensorflow.python.eager.benchmarks.resnet50 import resnet50_test_util
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the ResNet50Test obj's underlying member method code with example usage: obj._apply(defun, execution_mode) without return types