def getEnvironment(name):
    for node in foundation.RomeoKeyValue.search('NAME', value=name):
        for obj in node.ANCESTORS:
            if not obj.ROOTNODE: continue
            if not obj.isRelated(node): continue
            return obj
    raise EnvironmentalError('no environment %s' % (name,))
Basic sanity check that the function does not crash and decomposes
dataset/ETHPy150Open OrbitzWorldwide/droned/romeo/lib/romeo/__init__.py/getEnvironment--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/custom/bihar/tests/test_due_list.py/TestDueList.test_get_due_list_records