code: def read_data_from_kvstore(addr, port, scope, key):
      try:
          url = "http://{addr}:{port}/{scope}/{key}".format(
              addr=addr, port=str(port), scope=scope, key=key
          )
          req = Request(url)
          resp = urlopen(req)
          # TODO: remove base64 encoding because base64 is not efficient
          return codec.loads_base64(resp.read())
      except (HTTPError, URLError) as e:
          raise RuntimeError("Read data from KVStore server failed.", e)
  
imports: from urllib.error import HTTPError, URLError
  from urllib.request import Request
  from urllib.request import urlopen
  from horovod.runner.common.util import codec
label_desc: Use image node_id 1 for calling a global function with example usage: read_data_from_kvstore(addr, port, scope, key) and returns: codec