code: def perform_merges_assert_correct_merge(frame1, frame2, sortColumns):
      mergeKeepLeft = frame1.merge(
          frame2, all_x=True
      )  # should equal to mergeKeepRight2
      mergeKeepRight2 = frame2.merge(frame1, all_y=True)
      assert_equal_frames(mergeKeepLeft, mergeKeepRight2, sortColumns)
  
      mergeKeepRight = frame1.merge(
          frame2, all_y=True
      )  # should equal to mergeLeft2
      mergeKeepLeft2 = frame2.merge(frame1, all_x=True)
      assert_equal_frames(mergeKeepRight, mergeKeepLeft2, sortColumns)
  
      # merge right, left should all have equal NaNs in them
      assert total_na_cnts(mergeKeepRight) == total_na_cnts(
          mergeKeepLeft2
      ), "Na counts should equal but frame 1 has {0} and frame 2 has {1}".format(
          mergeKeepRight.nacnt(), mergeKeepLeft2.nacnt()
      )
      assert total_na_cnts(mergeKeepRight2) == total_na_cnts(
          mergeKeepLeft
      ), "Na counts should equal but frame 1 has {0} and frame 2 has {1}".format(
          mergeKeepRight2.nacnt(), mergeKeepLeft.nacnt()
      )
  
imports: import sys
  import h2o
  from tests import pyunit_utils
label_desc: Use image node_id 2 for calling a global function with example usage: perform_merges_assert_correct_merge(frame1, frame2, sortColumns) without return types