code: def test_launch(self):
      os.environ["GOOGLE_CLOUD_BUCKET_NAME"] = "lpbucket"
      launchpad_dir = os.path.dirname(
          os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
      )
      docker_requirements = os.path.join(
          launchpad_dir, "examples/consumer_producers/requirements.txt"
      )
      docker_config = xm_docker.DockerConfig(
          launchpad_dir, docker_requirements
      )
      resources = {"hello_printer": docker_config}
  
      program = make_program()
  
      # Launch should fail accessing GCP.
      exception_msg = (
          "Request failed|404|The specified bucket does not exist|CP project "
          "seems not to be configured correctly"
          # We allow digit-only messages, assuming this is a KeyError as reported
          # in b/241629570. Should be fixed together with
          # https://github.com/python/cpython/issues/91351.
          r"|\d+"
      )
      with self.assertRaisesRegex(Exception, exception_msg):
          lp.launch(
              program,
              launch_type=lp.LaunchType.VERTEX_AI,
              xm_resources=resources,
          )
  
file_path: launchpad/launchpad/launch/xm_docker/launch_test.py
imports: import os
  from absl.testing import absltest
  import launchpad
  from launchpad.nodes.python import xm_docker
label_desc: Use image node_id 1 for calling the LaunchTest obj's underlying member method code with example usage: obj.test_launch() without return types