docstr: Request GPU when multiple TF nodes land on same executor
docstr_tok: ["Request","GPU","when","multiple","TF","nodes","land","on","same","executor"]
code: def test_gpu_cluster_spec(
      self, mock_available, mock_get_gpus, mock_get_spec
  ):
      """Request GPU when multiple TF nodes land on same executor"""
  
      mock_available.return_value = True
      mock_get_gpus.return_value = ["0"]
      mock_get_spec.return_value = {
          "chief": ["1.1.1.1:2222"],
          "worker": ["1.1.1.1:2223", "1.1.1.1:2224", "2.2.2.2:2222"],
      }
  
      self.cluster_meta["cluster_template"] = {
          "chief": [0],
          "worker": [1, 2, 3],
      }
      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)
  
      map_fn = TFSparkNode.run(
          self.default_fn,
          tf_args,
          self.cluster_meta,
          self.tensorboard,
          self.log_dir,
          self.queues,
          self.background,
      )
      map_fn([2])  # worker:1
      mock_get_gpus.assert_called_with(1, 2, format=gpu_info.AS_LIST)
  
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 7 for calling the TFSparkNodeTest obj's underlying member method code with example usage: obj.test_gpu_cluster_spec(mock_available, mock_get_gpus, mock_get_spec) without return types