code: def cleanup(a_node, models=None, frames=None):
      """
      DELETE the specified models and frames from H2O.
      """
      ###################
      # test delete_model
      if models is None:
          a_node.delete_models()
      else:
          for model in models:
              a_node.delete_model(model)
  
      ms = a_node.models()
      if models is None:
          assert "models" in ms and 0 == len(ms["models"]), (
              "FAIL: Called delete_models and the models list isn't empty: "
              + h2o_test_utils.dump_json(ms)
          )
      else:
          for model in models:
              for m in ms["models"]:
                  assert m["model_id"] != model, (
                      "FAIL: Found model that we tried to delete in the models list: "
                      + model
                  )
  
      ###################
      # test delete_frame
      if frames is not None:
          for frame in frames:
              a_node.delete_frame(frame)
              ms = a_node.frames(row_count=5)
  
              found = False
              for m in ms["frames"]:
                  assert m["frame_id"] != frame, (
                      "FAIL: Found frame that we tried to delete in the frames list: "
                      + frame
                  )
  
imports: import sys, os, time, json, datetime, errno, stat, getpass, requests, pprint
  import h2o
label_desc: Use image node_id 28 for calling a global function with example usage: cleanup(a_node, models, frames) without return types