code: def get_ip_address():
      """Simple utility to get host IP address."""
      try:
          s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
          s.connect(("8.8.8.8", 80))
          ip_address = s.getsockname()[0]
      except socket_error as sockerr:
          if sockerr.errno != errno.ENETUNREACH:
              raise sockerr
          ip_address = socket.gethostbyname(socket.getfqdn())
      finally:
          s.close()
  
      return ip_address
  
file_path: TensorFlowOnSpark/tensorflowonspark/util.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import nested_scopes
  from __future__ import print_function
  import logging
  import os
  import socket
  import subprocess
  import errno
  from socket import error
  from .None import gpu_info
label_desc: Use image node_id 2 for calling a global function with example usage: get_ip_address() and returns: ip_address