def find_wrapper(env_top, search_string):
    """
    recursively search for env wrapper containing the given string

    :param env_top: top-level environment
    :param search_string: (string) string to find in wrapper class name
    :return: environment, (optional) stack of searched environments
    """
    stack = []
    curr_env = env_top
    assert curr_env is not env_top.unwrapped
    while search_string not in curr_env.class_name():
        stack.append(curr_env)
        curr_env = curr_env.env
        assert curr_env is not env_top.unwrapped
    assert search_string in curr_env.class_name()
    return curr_env, stack