code: def test():
      """Test program for telnetlib.
  
      Usage: python telnetlib.py [-d] ... [host [port]]
  
      Default host is localhost; default port is 23.
  
      """
      debuglevel = 0
      while sys.argv[1:] and sys.argv[1] == "-d":
          debuglevel = debuglevel + 1
          del sys.argv[1]
      host = "localhost"
      if sys.argv[1:]:
          host = sys.argv[1]
      port = 0
      if sys.argv[2:]:
          portstr = sys.argv[2]
          try:
              port = int(portstr)
          except ValueError:
              port = socket.getservbyname(portstr, "tcp")
      with Telnet() as tn:
          tn.set_debuglevel(debuglevel)
          tn.open(host, port, timeout=0.5)
          tn.interact()
  
imports: import sys
  import socket
  import selectors
  from time import monotonic
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: test() without return types