code: def encryptMasterPSW(password):
      filename = os.path.join(KEY_PATH, "encryptMasterPassword.exp")
      with open(filename, "w") as f:
          f.write(
              """
          spawn mvn --encrypt-master-password
          expect -exact "Master password: "
          send -- "{}\r"
          expect eof
          """.format(
                  password
              )
          )
      result = subprocess.check_output(["expect", filename])
      return str(result).split("\r\n")[-1][2:-3]
  
file_path: mxnet/ci/publish/scala/buildkey.py
imports: import os
  import json
  import logging
  import subprocess
label_desc: Use image node_id 3 for calling a global function with example usage: encryptMasterPSW(password) and returns: str