class_docstr: ImportApiPackagesTest class. See description at the top of the file.
code: def setUp(self):
      def _get_api_packages_v2():
          api_packages_path = pkg_resources.resource_filename(
              "tensorflow", "_api/v2/api_packages.txt"
          )
  
          logging.info("Load api packages file: %s", api_packages_path)
          with open(api_packages_path) as file:
              return set(file.read().splitlines())
  
      super().setUp()
      self.api_packages_v2 = _get_api_packages_v2()
      # Some paths in the api_packages_path file cannot be directly imported.
      # These paths may point to attributes or sub-modules within a module's
      # namespace, but they don't correspond to an actual file
      # or directory on the filesystem.
      self.packages_for_skip = [
          "tensorflow.distribute.cluster_resolver",
          "tensorflow.lite.experimental.authoring",
          "tensorflow.distribute.experimental.coordinator",
          "tensorflow.summary.experimental",
          "tensorflow.distribute.coordinator",
          "tensorflow.distribute.experimental.partitioners",
      ]
  
imports: import logging
  import unittest
  import pkg_resources
label_desc: Use image node_id 1 for calling the ImportApiPackagesTest obj's underlying member method code with example usage: obj.setUp() and returns: set