code: def _test_serving(self, data_in, expected_data_out, wrapper=None):
      self.port = randint(5000, 9000)
      server_experimentid = "test_serving_" + str(uuid.uuid4())
  
      args = [
          "studio",
          "run",
          "--force-git",
          "--verbose=debug",
          "--experiment=" + server_experimentid,
          "--config=" + self.get_config_path(),
          "studio::serve_main",
          "--port=" + str(self.port),
          "--host=localhost",
      ]
  
      if wrapper:
          args.append("--wrapper=" + wrapper)
  
      subprocess.Popen(args, cwd=os.path.dirname(__file__))
      time.sleep(60)
  
      try:
          retval = requests.post(
              url="http://localhost:" + str(self.port), json=data_in
          )
          data_out = retval.json()
          assert data_out == expected_data_out
  
      finally:
          with model.get_db_provider(
              model.get_config(self.get_config_path())
          ) as db:
              db.stop_experiment(server_experimentid)
              time.sleep(20)
              db.delete_experiment(server_experimentid)
  
file_path: studio/tests/serving_test.py
imports: import unittest
  import subprocess
  import time
  from random import randint
  import os
  import uuid
  import requests
  from studio import model
  from env_detect import on_gcp
label_desc: Use image node_id 1 for calling the ServingTest obj's underlying member method code with example usage: obj._test_serving(data_in, expected_data_out, wrapper) without return types