def _bind(lambda_fn, **closure_kwargs):
    """Creates a closure around a lambda function by binding `closure_kwargs` to the function."""

    def closure(*args, **kwargs):
        _k = {}
        _k.update(kwargs)
        _k.update(closure_kwargs)
        return lambda_fn(*args, **_k)

    return closure