def lookup_from_kwargs_env(kwargs, env, attr, default=None):
    """
    __getitem__ from kwargs, env, or default.

    Args:
        kwargs (dict): kwargs dict
        env (Env): :py:mod:`Env` dict
        attr (str): attribute name
        default (obj): default value to return if not found in kwargs or env
    Returns:
        obj: kwargs.get(attr, env.get(attr, default))
    """
    return kwargs.get(attr, env.get(attr, default))