code: def melt_compare(df, **kwargs):
      frozen_h2o = H2OFrame(df)
      melted_h2o = frozen_h2o.melt(**kwargs)
  
      def sort(f):
          var_name = (
              kwargs["var_name"] if "var_name" in kwargs else "variable"
          )
          return f.sort_values(
              by=kwargs["id_vars"] + [var_name]
          ).reset_index(drop=True)
  
      actual = sort(melted_h2o.as_data_frame())
      expected = sort(pd.melt(df, **kwargs))
  
      assert expected.equals(actual)
  
imports: import sys
  import pandas
  from h2o.frame import H2OFrame
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: melt_compare(df) and returns: f