code: def fetch_parameter_file(args):
      class FetchThread(threading.Thread):
          def __init__(self, args):
              super(FetchThread, self).__init__()
              self.args = args
  
          def run(self):
              uri = gen_parameter_meta_url(
                  self.args.nnimanager_ip, self.args.nnimanager_port
              )
              nni_log(LogType.Info, uri)
  
              while True:
                  res = rest_get(uri, 10)
                  nni_log(
                      LogType.Debug,
                      "status code: {}".format(res.status_code),
                  )
                  if res.status_code == 200:
                      meta_list = res.json()
                      download_parameter(meta_list, self.args)
                  else:
                      nni_log(
                          LogType.Warning,
                          "rest response: {}".format(str(res)),
                      )
                  time.sleep(5)
  
      fetch_file_thread = FetchThread(args)
      fetch_file_thread.start()
  
imports: import argparse
  import ctypes
  import json
  import logging
  import os
  import re
  import shlex
  import sys
  import threading
  import time
  from subprocess import Popen
  import pkg_resources
  from pyhdfs import HdfsClient
  from .constants import LOG_DIR, MULTI_PHASE, NNI_EXP_ID, NNI_PLATFORM, NNI_SYS_DIR, NNI_TRIAL_JOB_ID
  from .hdfsClientUtility import copyDirectoryToHdfs, copyHdfsDirectoryToLocal, copyHdfsFileToLocal
  from .log_utils import LogType, RemoteLogger, StdOutputType, nni_log
  from .rest_utils import rest_get, rest_post
  from .url_utils import gen_parameter_meta_url, gen_send_version_url
label_desc: Use image node_id 7 for calling a global function with example usage: fetch_parameter_file(args) without return types