code: def load_ip_addr(ip_config):
      if isinstance(ip_config, str):
          ip_addr_list = []
          with open(ip_config, "r") as f:
              for line in f:
                  ip_addr_list.append(line.strip())
          ip_addr = ";".join(ip_addr_list)
      elif isinstance(ip_config, list):
          ip_addr = ";".join(ip_config)
      else:
          raise TypeError(
              "ip_config should be list of IP address or "
              "a path of IP configuration file. "
              "But got %s" % (type(ip_config))
          )
      return ip_addr
  
imports: import sys
  import datetime
  import os
  import yaml
  import random
  import shutil
  import six
  import warnings
  import glob
  from collections import defaultdict
  from pgl.utils.logger import log
label_desc: Use image node_id 7 for calling a global function with example usage: load_ip_addr(ip_config) and returns: ip_addr