def env(target_key, entity, *_):
    if not target_key:
        yield entity.env
    for extra in entity.env.extras:
        if target_key in getattr(extra, 'target_keys', ()):
            yield extra
        for target in recursive_targets(getattr(extra, 'target_providers', ()), target_key):
            yield target
dataset/ETHPy150Open genzgd/Lampost-Mud/lampost/gameops/target_gen.py/env/original