code: def check_params_update_kwargs(
      params_dict, kw, function, print_params
  ):
      # only update params_dict..don't add
      # throw away anything else as it should come from the model (propagating what RF used)
      for k in kw:
          if k in params_dict:
              params_dict[k] = kw[k]
          else:
              raise Exception(
                  "illegal parameter '%s' in %s" % (k, function)
              )
  
      if print_params:
          print("%s parameters:" % function + repr(params_dict))
          sys.stdout.flush()
  
imports: import sys, os, time, json, datetime, errno, stat, getpass, requests, pprint
  import h2o
label_desc: Use image node_id 7 for calling a global function with example usage: check_params_update_kwargs(params_dict, kw, function, print_params) without return types