code: def test_reservation_environment_exists_port_spec(self):
      tfos_server = Server(1)
      with mock.patch.dict(os.environ, {"TFOS_SERVER_PORT": "9999"}):
          self.assertEqual(tfos_server.get_server_ports(), [9999])
  
      with mock.patch.dict(
          os.environ, {"TFOS_SERVER_PORT": "9997-9999"}
      ):
          self.assertEqual(
              tfos_server.get_server_ports(), [9997, 9998, 9999]
          )
  
file_path: TensorFlowOnSpark/tests/test_reservation.py
imports: import os
  import threading
  import time
  import unittest
  from tensorflowonspark import util
  from tensorflowonspark.reservation import Reservations, Server, Client
  from unittest import mock
label_desc: Use image node_id 7 for calling the ReservationTest obj's underlying member method code with example usage: obj.test_reservation_environment_exists_port_spec() without return types