code: def compare_multiset_states(s1, s2):
      """compare for equality two instances of multiset partition states
  
      This is useful for comparing different versions of the algorithm
      to verify correctness."""
      # Comparison is physical, the only use of semantics is to ignore
      # trash off the top of the stack.
      f1, lpart1, pstack1 = s1
      f2, lpart2, pstack2 = s2
  
      if (lpart1 == lpart2) and (
          f1[0 : lpart1 + 1] == f2[0 : lpart2 + 1]
      ):
          if pstack1[0 : f1[lpart1 + 1]] == pstack2[0 : f2[lpart2 + 1]]:
              return True
      return False
  
file_path: sympy/sympy/utilities/tests/test_enumerative.py
imports: from itertools import zip_longest
  from sympy.utilities.enumerative import list_visitor, MultisetPartitionTraverser, multiset_partitions_taocp
  from sympy.utilities.iterables import _set_partitions
label_desc: Use image node_id 4 for calling a global function with example usage: compare_multiset_states(s1, s2) and returns: False, True