def METHOD_NAME(
    handler_obj, handler_method, handler_args, handler_kwargs,
    perm_function):
  """Redirect, abort(403), or call handler_method."""
  user = handler_obj.get_current_user()
  req = handler_obj.request
  # Give the user a chance to sign in
  if not user and req.method == 'GET':
    return _maybe_redirect_to_login(handler_obj)
  if not perm_function(user):
    handler_obj.abort(403)
  else:
    return handler_method(handler_obj, *handler_args, **handler_kwargs)