The function I wrote was `blocks_are_equivalent` in xblock/test/tools.py.