docstr: Spark resource API w/ no available GPU and no fallback (in K8s) with num_gpus set
docstr_tok: ["Spark","resource","API","w\/","no","available","GPU","and","no","fallback","(","in","K8s",")","with","num_gpus","set"]
code: def test_gpu_spark_unavailable_but_requested(
      self,
      mock_available,
      mock_get_gpus,
      mock_spark_resources,
      mock_context,
  ):
      """Spark resource API w/ no available GPU and no fallback (in K8s) with num_gpus set"""
      mock_available.return_value = True
      mock_get_gpus.return_value = ["0"]
      mock_spark_resources.return_value = True
      mock_context_instance = mock_context.return_value
      mock_context_instance.resources.return_value = {}
  
      self.parser.add_argument(
          "--num_gpus", help="number of gpus to use", type=int
      )
      tf_args = self.parser.parse_args(["--num_gpus", "1"])
      print("tf_args:", tf_args)
  
      with self.assertRaises(Exception):
          map_fn = TFSparkNode.run(
              self.default_fn,
              tf_args,
              self.cluster_meta,
              self.tensorboard,
              self.log_dir,
              self.queues,
              self.background,
          )
          map_fn([0])
  
file_path: TensorFlowOnSpark/tests/test_TFSparkNode.py
imports: import argparse
  import os
  import random
  import unittest
  from tensorflowonspark import gpu_info, reservation, TFSparkNode
  from unittest.mock import patch
label_desc: Use image node_id 11 for calling the TFSparkNodeTest obj's underlying member method code with example usage: obj.test_gpu_spark_unavailable_but_requested(mock_available, mock_get_gpus, mock_spark_resources, mock_context) without return types