code: def check(ppml_args, arg_name):
      try:
          value = ppml_args[arg_name]
          return value
      except KeyError:
          invalidInputError(False, "need argument " + arg_name)
  
imports: from bigdl.ppml.api import *
  from bigdl.ppml.utils.log4Error import *
  from enum import Enum
  from pyspark.sql import SparkSession
  from pyspark.ml.wrapper import JavaParams
label_desc: Use image node_id 1 for calling a global function with example usage: check(ppml_args, arg_name) and returns: value