code: def encode_json(json_file, is_print=False):
      r"""Encode json string to compressed base64 string.
  
      Parameters
      ----------
      json_file : str
          String value represents the path to json file.
      is_print : bool
          Boolean value controls whether to print the encoded base64 string.
      """
      with open(json_file, encoding="utf-8") as fh:
          data = fh.read()
      zipped_str = zlib.compress(data.encode("utf-8"))
      b64_str = base64.b64encode(zipped_str)
      if is_print:
          print(b64_str)
      return b64_str
  
imports: import zlib
  import base64
label_desc: Use image node_id 1 for calling a global function with example usage: encode_json(json_file, is_print) and returns: b64_str