code: def validate_actual_parameters(
      input_parameters,
      actual_parameters,
      training_frame,
      validation_frame,
  ):
      """
      Validate that the returned parameters list for a model build contains all the values we passed in as input.
      """
      actuals_dict = list_to_dict(actual_parameters, "name")
      for k, expected in input_parameters.items():
          # TODO: skipping some stuff for now because they aren't serialized properly
          if k is "response_column":
              continue
  
          # TODO: skipping training frame becuase model building is now changing the training frame.  Why?!
          if k is "training_frame":
              continue
  
          # Python says True; json says true
          assert k in actuals_dict, (
              "FAIL: Expected key "
              + k
              + " not found in actual parameters list."
          )
  
          actual = actuals_dict[k]["actual_value"]
          actual_type = actuals_dict[k]["type"]
  
          if actual_type == "boolean":
              expected = bool(expected)
              actual = (
                  True if "true" == actual else False
              )  # true -> True
          elif actual_type == "int":
              expected = int(expected)
              actual = int(actual)
          elif actual_type == "long":
              expected = long(expected)
              actual = long(actual)
          elif actual_type == "string":
              # convert from Unicode
              expected = str(expected)
              actual = str(actual)
          elif actual_type == "string[]":
              # convert from Unicode
              # expected = [str(expected_val) for expected_val in expected]
              actual = [str(actual_val) for actual_val in actual]
          elif actual_type == "double":
              expected = float(expected)
              actual = float(actual)
          elif actual_type == "float":
              expected = float(expected)
              actual = float(actual)
          elif actual_type.startswith("Key<"):
              # For keys we send just a String but receive an object
              expected = expected
              actual = actual["name"]
  
          # TODO: don't do exact comparison of floating point!
  
          assert expected == actual, (
              "FAIL: Parameter with name: "
              + k
              + " expected to have input value: "
              + str(expected)
              + ", instead has: "
              + str(actual)
              + " cast from: "
              + str(actuals_dict[k]["actual_value"])
              + " ( type of expected: "
              + str(type(expected))
              + ", type of actual: "
              + str(type(actual))
              + ")"
          )
  
imports: import sys, os, time, json, datetime, errno, stat, getpass, requests, pprint
  import h2o
label_desc: Use image node_id 24 for calling a global function with example usage: validate_actual_parameters(input_parameters, actual_parameters, training_frame, validation_frame) without return types