code: def get_ip_address():
      """
      get the IP address of the host.
      """
  
      # Windows
      if _IS_WINDOWS:
          local_ip = socket.gethostbyname(socket.gethostname())
      else:
          # Linux and MacOS
          local_ip = None
          try:
              # First way, tested in Ubuntu and MacOS
              s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
              s.connect(("8.8.8.8", 80))
              local_ip = s.getsockname()[0]
              s.close()
          except:
              # Second way, tested in CentOS
              try:
                  local_ip = socket.gethostbyname(socket.gethostname())
              except:
                  pass
  
      if (
          local_ip == None
          or local_ip == "127.0.0.1"
          or local_ip == "127.0.1.1"
      ):
          logger.warning(
              "get_ip_address failed, please set ip address manually."
          )
          return None
  
      return local_ip
  
file_path: PARL/parl/utils/machine_info.py
imports: import os
  import platform
  import random
  import socket
  import subprocess
  from parl.utils import logger, _HAS_FLUID, _HAS_PADDLE, _IS_WINDOWS
label_desc: Use image node_id 1 for calling a global function with example usage: get_ip_address() and returns: local_ip, None