code: def login_required(view):
      """View decorator that redirects anonymous users to the login page."""
  
      @functools.wraps(view)
      def wrapped_view(**kwargs):
          if g.user is None:
              return redirect(url_for("auth.login"))
  
          return view(**kwargs)
  
      return wrapped_view
  
file_path: flask/examples/tutorial/flaskr/auth.py
imports: import functools
  from flask import Blueprint
  from flask import flash
  from flask import g
  from flask import redirect
  from flask import render_template
  from flask import request
  from flask import session
  from flask import url_for
  from werkzeug.security import check_password_hash
  from werkzeug.security import generate_password_hash
  from .db import get_db
label_desc: Use image node_id 1 for calling a global function with example usage: login_required(view) and returns: wrapped_view, view, redirect