code: def check_server_connection(request):
      host = request.config.getoption("--host")
      port = request.config.getoption("--port")
  
      connected = True
      if host and (host not in ["localhost", "127.0.0.1"]):
          try:
              socket.getaddrinfo(host, port, 0, 0, socket.IPPROTO_TCP)
          except Exception as e:
              print("Socket connnet failed: %s" % str(e))
              connected = False
      return connected
  
imports: import logging
  import pytest
  import functools
  import socket
  import common.common_type
  import common.common_func
  from utils.util_log import test_log
  from common.common_func import param_info
  from check.param_check import ip_check, number_check
  from config.log_config import log_config
  from utils.util_pymilvus import get_milvus, gen_unique_str, gen_default_fields, gen_binary_default_fields
  from pymilvus.orm.types import CONSISTENCY_STRONG
label_desc: Use image node_id 43 for calling a global function with example usage: check_server_connection(request) and returns: connected