code: def get_access_token(ak: str = None, sk: str = None) -> str:
      """
      Get Access Token
  
      Params:
          ak(str): API Key
          sk(str): Secret Key
  
      Return:
          access_token(str): Access Token
      """
      ak = ak if ak else os.getenv("WENXIN_AK")
      sk = sk if sk else os.getenv("WENXIN_SK")
  
      assert ak and sk, RuntimeError(
          "Please go to the wenxin official website to apply for AK and SK and set the parameters “ak” and “sk” correctly, or set the environment variables “WENXIN_AK” and “WENXIN_SK”."
      )
  
      url = "https://wenxin.baidu.com/younger/portal/api/oauth/token"
      headers = {"Content-Type": "application/x-www-form-urlencoded"}
      datas = {
          "grant_type": "client_credentials",
          "client_id": ak,
          "client_secret": sk,
      }
  
      responses = requests.post(url, datas, headers=headers)
  
      assert (
          responses.status_code == 200
      ), f"Network Error {responses.status_code}."
  
      results = json.loads(responses.text)
  
      assert (
          results["msg"] == "success"
      ), f"Error message: '{results['msg']}'. Please check the ak and sk."
  
      return results["data"]
  
imports: import argparse
  import json
  import os
  import requests
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
label_desc: Use image node_id 1 for calling a global function with example usage: get_access_token(ak, sk) and returns: results