code: def setUp(self):
      super().setUp()
  
      # Change the encoding for Click since Python 3 is configured to use ASCII as
      # encoding for the environment.
      if codecs.lookup(locale.getpreferredencoding()).name == "ascii":
          os.environ["LANG"] = "en_US.utf-8"
  
      # Setup local_home in a temp directory
      self._home = self.tmp_dir
      self._local_home = os.path.join(self._home, "local")
      self.enter_context(
          test_case_utils.override_env_var(
              "LOCAL_HOME", self._local_home
          )
      )
      self.enter_context(
          test_case_utils.override_env_var("HOME", self._home)
      )
  
      # Testdata path.
      self._testdata_dir = os.path.join(
          os.path.dirname(os.path.dirname(__file__)), "testdata"
      )
  
      # Copy data.
      chicago_taxi_pipeline_dir = os.path.join(
          os.path.dirname(
              os.path.dirname(
                  os.path.dirname(
                      os.path.dirname(os.path.abspath(__file__))
                  )
              )
          ),
          "examples",
          "chicago_taxi_pipeline",
          "",
      )
      data_dir = os.path.join(
          chicago_taxi_pipeline_dir, "data", "simple"
      )
      content = fileio.listdir(data_dir)
      assert content, "content in {} is empty".format(data_dir)
      target_data_dir = os.path.join(
          self._home, "taxi", "data", "simple"
      )
      io_utils.copy_dir(data_dir, target_data_dir)
      assert fileio.isdir(target_data_dir)
      content = fileio.listdir(target_data_dir)
      assert content, "content in {} is {}".format(
          target_data_dir, content
      )
      io_utils.copy_file(
          os.path.join(chicago_taxi_pipeline_dir, "taxi_utils.py"),
          os.path.join(self._home, "taxi", "taxi_utils.py"),
      )
  
      # Initialize CLI runner.
      self.runner = click_testing.CliRunner()
  
imports: import codecs
  import locale
  import os
  from absl import logging
  from click import testing
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.tools.cli.cli_main import cli_group
  from tfx.utils import io_utils
  from tfx.utils import test_case_utils
label_desc: Use image node_id 1 for calling the CliLocalEndToEndTest obj's underlying member method code with example usage: obj.setUp() without return types