code: def filter_local_addresses(all_host_names):
      local_addresses = _get_local_host_addresses()
  
      def resolve_host_name(host_name):
          try:
              return socket.gethostbyname(host_name)
          except socket.gaierror:
              return None
  
      args_list = [host for host in all_host_names]
      host_addresses = execute_function_multithreaded(
          resolve_host_name, args_list
      ).values()
  
      remote_host_names = []
      for host_address, host_name in zip(
          host_addresses, all_host_names
      ):
          if not host_address or host_address not in local_addresses:
              remote_host_names.append(host_name)
  
      return remote_host_names
  
file_path: bluefog/bluefog/run/network_util.py
imports: import concurrent.futures
  import io
  import os
  import re
  import socket
  import psutil
  from bluefog.run.horovodrun.common.util import safe_shell_exec
label_desc: Use image node_id 6 for calling a global function with example usage: filter_local_addresses(all_host_names) and returns: remote_host_names, socket, None