code: def register(base_url, mr_enclave, mr_signer, appid, apikey):
      payload = OrderedDict()
      payload["mr_enclave"] = mr_enclave
      payload["mr_signer"] = mr_signer
      init_appid_apikey(appid, apikey)
      params = init_params(payload)
      resp = requests.post(
          url=base_url + "UploadQuotePolicy",
          data=json.dumps(params),
          headers=headers,
          verify=use_secure_cert,
      )
      if check_result(resp, "UploadQuotePolicy") == False:
          return
      print("[INFO] register resp:\n%s\n" % (resp.text))
  
      policyId = json.loads(resp.text)["result"]["policyId"]
      print("[INFO] policyID:\n%s\n" % (policyId))
      return policyId
  
file_path: BigDL/ppml/base/register-mrenclave.py
imports: import requests
  import json
  import argparse
  import base64
  import time
  import random
  import hmac
  from hashlib import sha256
  from collections import OrderedDict
  import urllib.parse
  from requests.packages import urllib3
label_desc: Use image node_id 6 for calling a global function with example usage: register(base_url, mr_enclave, mr_signer, appid, apikey) and returns: policyId