code: def test_same_port_is_returned(self):
      start = 7860
      end = 7960
      try:
          port1 = networking.get_first_available_port(start, end)
          port2 = networking.get_first_available_port(start, end)
          assert port1 == port2
      except OSError:
          warnings.warn("Unable to test, no ports available")
  
file_path: gradio/test/test_networking.py
imports: import os
  import urllib
  import warnings
  import pytest
  from fastapi.testclient import TestClient
  import gradio
  from gradio import Interface, networking
label_desc: Use image node_id 2 for calling the TestPort obj's underlying member method code with example usage: obj.test_same_port_is_returned() without return types