code: def _compare_tfx_ir_against_testdata(
      self, args: List[str], golden_file: str
  ):
      index_of_tfx_ir_flag = args.index("--tfx_ir")
      self.assertAllGreater(len(args), index_of_tfx_ir_flag)
      real_tfx_ir = json.loads(args[index_of_tfx_ir_flag + 1])
      real_tfx_ir_str = json.dumps(real_tfx_ir, sort_keys=True)
      with open(
          os.path.join(self._source_data_dir, golden_file)
      ) as tfx_ir_json_file:
          formatted_tfx_ir = json.dumps(
              json.load(tfx_ir_json_file), sort_keys=True
          )
          self.assertEqual(real_tfx_ir_str, formatted_tfx_ir)
  
imports: import json
  import os
  import tarfile
  from typing import List
  from kfp import onprem
  import tensorflow
  from tfx.components.statistics_gen import component
  from tfx.dsl.component.experimental import executor_specs
  from tfx.dsl.component.experimental.annotations import Parameter
  from tfx.dsl.component.experimental.decorators import component
  from tfx.dsl.components.base import base_component
  from tfx.dsl.io import fileio
  from tfx.extensions.google_cloud_big_query.example_gen import component
  from tfx.orchestration import data_types
  from tfx.orchestration import pipeline
  from tfx.orchestration.kubeflow import kubeflow_dag_runner
  from tfx.orchestration.kubeflow.decorators import FinalStatusStr
  from tfx.proto import example_gen_pb2
  from tfx.types import component_spec
  from tfx.utils import telemetry_utils
  from tfx.utils import test_case_utils
  import yaml
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling the KubeflowDagRunnerTest obj's underlying member method code with example usage: obj._compare_tfx_ir_against_testdata(args, golden_file) without return types