You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: marshaltestlib.rb
    path of file: ./repos/ruby/test/ruby
    
    the code of the file until where you have to start completion: # coding: utf-8
# frozen_string_literal: false
module MarshalTestLib
  # include this module to a Test::Unit::TestCase and define encode(o) and
  # decode(s) methods.  e.g.
  #
  # def encode(
    
  def marshal_equal(o1, msg = nil)
    msg = msg ? msg + "(#{ caller[0] })" : caller[0]
    o2 = marshaltest(o1)
    assert_equal(o1.class, o2.class, msg)
    iv1 = o1.instance_variables.sort
    iv2 = o2.instance_variables.sort
    assert_equal(iv1, iv2)
    val1 = iv1.map {|var| o1.instance_eval {eval var.to_s}}
    val2 = iv1.map {|var| o2.instance_eval {eval var.to_s}}
    assert_equal(val1, val2, msg)
    if block_given?
      assert_equal(yield(o1), yield(o2), msg)
    else
      assert_equal(o1, o2, msg)
    end