class_docstr: Common behavior shared between :class:`~flask.Flask` and
  :class:`~flask.blueprints.Blueprint`.
  
  :param import_name: The import name of the module where this object
      is defined. Usually :attr:`__name__` should be used.
  :param static_folder: Path to a folder of static files to serve.
      If this is set, a static route will be added.
  :param static_url_path: URL prefix for the static route.
  :param template_folder: Path to a folder containing template files.
      for rendering. If this is set, a Jinja loader will be added.
  :param root_path: The path that static, template, and resource files
      are relative to. Typically not set, it is discovered based on
      the ``import_name``.
  
  .. versionadded:: 2.0
class_docstr_tok: ["Common","behavior","shared","between",":","class",":","`","~flask.Flask","`","and",":","class",":","`","~flask.blueprints.Blueprint","`",".",":","param","import_name",":","The","import","name","of","the","module","where","this","object","is","defined",".","Usually",":","attr",":","`","__name__","`","should","be","used",".",":","param","static_folder",":","Path","to","a","folder","of","static","files","to","serve",".","If","this","is","set",",","a","static","route","will","be","added",".",":","param","static_url_path",":","URL","prefix","for","the","static","route",".",":","param","template_folder",":","Path","to","a","folder","containing","template","files",".","for","rendering",".","If","this","is","set",",","a","Jinja","loader","will","be","added",".",":","param","root_path",":","The","path","that","static",",","template",",","and","resource","files","are","relative","to",".","Typically","not","set",",","it","is","discovered","based","on","the","``","import_name","``",".","..","versionadded",":",":","2.0"]
docstr: Register a URL value preprocessor function for all view
  functions in the application. These functions will be called before the
  :meth:`before_request` functions.
  
  The function can modify the values captured from the matched url before
  they are passed to the view. For example, this can be used to pop a
  common language code value and place it in ``g`` rather than pass it to
  every view.
  
  The function is passed the endpoint name and values dict. The return
  value is ignored.
  
  This is available on both app and blueprint objects. When used on an app, this
  is called for every request. When used on a blueprint, this is called for
  requests that the blueprint handles. To register with a blueprint and affect
  every request, use :meth:`.Blueprint.app_url_value_preprocessor`.
docstr_tok: ["Register","a","URL","value","preprocessor","function","for","all","view","functions","in","the","application",".","These","functions","will","be","called","before","the",":","meth",":","`","before_request","`","functions",".","The","function","can","modify","the","values","captured","from","the","matched","url","before","they","are","passed","to","the","view",".","For","example",",","this","can","be","used","to","pop","a","common","language","code","value","and","place","it","in","``","g","``","rather","than","pass","it","to","every","view",".","The","function","is","passed","the","endpoint","name","and","values","dict",".","The","return","value","is","ignored",".","This","is","available","on","both","app","and","blueprint","objects",".","When","used","on","an","app",",","this","is","called","for","every","request",".","When","used","on","a","blueprint",",","this","is","called","for","requests","that","the","blueprint","handles",".","To","register","with","a","blueprint","and","affect","every","request",",","use",":","meth",":","`",".Blueprint.app_url_value_preprocessor","`","."]
code: def url_value_preprocessor(
      self,
      f: T_url_value_preprocessor,
  ) -> T_url_value_preprocessor:
      """Register a URL value preprocessor function for all view
      functions in the application. These functions will be called before the
      :meth:`before_request` functions.
  
      The function can modify the values captured from the matched url before
      they are passed to the view. For example, this can be used to pop a
      common language code value and place it in ``g`` rather than pass it to
      every view.
  
      The function is passed the endpoint name and values dict. The return
      value is ignored.
  
      This is available on both app and blueprint objects. When used on an app, this
      is called for every request. When used on a blueprint, this is called for
      requests that the blueprint handles. To register with a blueprint and affect
      every request, use :meth:`.Blueprint.app_url_value_preprocessor`.
      """
      self.url_value_preprocessors[None].append(f)
      return f
  
imports: from __future__ import annotations
  import importlib.util
  import os
  import pathlib
  import sys
  import typing
  from collections import defaultdict
  from functools import update_wrapper
  from jinja2 import FileSystemLoader
  from werkzeug.exceptions import default_exceptions
  from werkzeug.exceptions import HTTPException
  from werkzeug.utils import cached_property
  from ..None import typing
  from ..cli import AppGroup
  from ..helpers import get_root_path
  from ..templating import _default_template_ctx_processor
label_desc: Use image node_id 23 for calling the Scaffold obj's underlying member method code with example usage: obj.url_value_preprocessor(f) and returns: f