human
Complete this python program:
def identified_stack(handler):
assistant
#Here is the Python code you requested.

    """Decorator that passes a stack identifier instead of path components.
    This is a handler method decorator.
    """
    @policy_enforce
    @six.wraps(handler)
    def handle_stack_method(controller, req, stack_name, stack_id, **kwargs):
        stack_identity = identifier.HeatIdentifier(req.context.tenant_id, stack_name, stack_id)
        return handler(controller, req, dict(stack_identity), **kwargs)
    return handle_stack_method