code: def test_executor(
      self, executor, model_name, batch_size, num_workers
  ):
      model = build_conv_model(model_name, batch_size)
      model.Proto().num_workers = num_workers
  
      def run_model():
          iterations = ITERATIONS
          if model_name == "MLP":
              iterations = (
                  1  # avoid numeric instability with MLP gradients
              )
          workspace.RunNet(model.net, iterations)
  
      self.compare_executors(
          model,
          ref_executor="simple",
          test_executor=executor,
          model_run_func=run_model,
      )
  
file_path: pytorch/caffe2/python/test/executor_test.py
imports: from caffe2.python import core, workspace
  from caffe2.python.test.executor_test_util import build_conv_model, build_resnet50_dataparallel_model, run_resnet50_epoch, ExecutorTestBase, executor_test_settings, executor_test_model_names
  from caffe2.python.test_util import TestCase
  from hypothesis import given
  import hypothesis.strategies
  import unittest
label_desc: Use image node_id 1 for calling the ExecutorCPUConvNetTest obj's underlying member method code with example usage: obj.test_executor(executor, model_name, batch_size, num_workers) without return types