def run_in_both(cls, reference, extra_classes=()):
    
    if reference.lower() != reference:
        raise ValueError('Test reference should be lowercase!')
    
    def wrapper(func):
        def runner():
            # Run in JS
            code = HasEventsJS.JSCODE
            for c in cls.mro()[1:]:
                if c is event.HasEvents:
                    break
                code += create_js_hasevents_class(c, c.__name__, c.__bases__[0].__name__+'.prototype')
            for c in extra_classes:
                code += create_js_hasevents_class(c, c.__name__)
            code += create_js_hasevents_class(cls, cls.__name__, cls.__bases__[0].__name__+'.prototype')
            code += py2js(func, 'test', inline_stdlib=False)
            code += 'test(%s);' % cls.__name__
            nargs, function_deps, method_deps = get_std_info(code)
            code = get_partial_std_lib(function_deps, method_deps, []) + code
            code = reduce_code(code)
            jsresult = evaljs(code)
            jsresult = jsresult.replace('[ ', '[').replace(' ]', ']').replace('\n  ', ' ')
            jsresult = jsresult.replace('"', "'").split('!!!!')[-1]
            print('js:', jsresult)
            # Run in Python
            pyresult = reprs(func(cls))
            pyresult = pyresult.replace('"', "'").replace("\\'", "'").split('!!!!')[-1]
            print('py:', pyresult)
            #
            assert pyresult.lower() == reference
            assert jsresult.lower() == reference
        return runner
    return wrapper
f should be a file-like object or a path to a zipfile
dataset/ETHPy150Open zoofIO/flexx/flexx/event/tests/test_both.py/run_in_both--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/builds/models.py/CommCareBuild.create_from_zip