code: def request_params(payload):
      params = OrderedDict()
      params["appid"] = appid
      ord_payload = OrderedDict(
          sorted(payload.items(), key=lambda k: k[0])
      )
      params["payload"] = urllib.parse.unquote(
          urllib.parse.urlencode(ord_payload)
      )
      params["timestamp"] = str(int(time.time() * 1000))
      sign_string = urllib.parse.unquote(urllib.parse.urlencode(params))
      sign = str(
          base64.b64encode(
              hmac.new(
                  apikey.encode("utf-8"),
                  sign_string.encode("utf-8"),
                  digestmod=sha256,
              ).digest()
          ),
          "utf-8",
      )
      params["payload"] = ord_payload
      params["sign"] = sign
      return params
  
file_path: BigDL/python/ppml/src/bigdl/ppml/kms/ehsm/caller.py
imports: import requests
  import json
  import base64
  import time
  import random
  import hmac
  from hashlib import sha256
  import os
  from collections import OrderedDict
  import urllib.parse
  from requests.packages import urllib3
label_desc: Use image node_id 1 for calling a global function with example usage: request_params(payload) and returns: params