code: def test_validate_machine_configuration(self):
      # valid GPU config
      gcp.validate_machine_configuration(
          4, 15, machine_config.AcceleratorType.NVIDIA_TESLA_K80, 4
      )
  
      # valid TPU config
      gcp.validate_machine_configuration(
          4, 15, machine_config.AcceleratorType.TPU_V3, 8
      )
  
      # test invalid config
      with self.assertRaisesRegex(
          ValueError, r"Invalid machine configuration"
      ):
          gcp.validate_machine_configuration(
              1, 15, machine_config.AcceleratorType.NVIDIA_TESLA_K80, 4
          )
  
file_path: cloud/src/python/tensorflow_cloud/core/tests/unit/gcp_test.py
imports: from absl.testing import absltest
  from tensorflow_cloud.core import gcp
  from tensorflow_cloud.core import machine_config
label_desc: Use image node_id 5 for calling the TestGcp obj's underlying member method code with example usage: obj.test_validate_machine_configuration() without return types