code: def send_poison_pill():
      sock = None
      for res in socket.getaddrinfo(
          "localhost", 50001, socket.AF_INET, socket.SOCK_STREAM
      ):
          af, socktype, proto, canonname, sa = res
          try:
              sock = socket.socket(af, socktype, proto)
          except OSError as oe:
              print(oe)
              sock = None
              continue
          try:
              sock.connect(sa)
          except OSError as oe:
              close_quietly(sock)
              print(oe)
              sock = None
              continue
          break
      if sock is not None:
          close_quietly(sock)
  
file_path: h2o-3/h2o-py/tests/testdir_misc/pyunit_log4j_cve.py
imports: import sys
  import socket
  import h2o
  from tests import pyunit_utils
  import time
  import threading
label_desc: Use image node_id 3 for calling a global function with example usage: send_poison_pill() without return types