code: def register_routes(datasette):
      config = datasette.plugin_config("register-route-demo")
      if not config:
          return
      path = config["path"]
  
      def new_table(request):
          return Response.text(
              "/db/table: {}".format(sorted(request.url_vars.items()))
          )
  
      return [
          (r"/{}/$".format(path), lambda: Response.text(path.upper())),
          # Also serves to demonstrate over-ride of default paths:
          (
              r"/(?P<db_name>[^/]+)/(?P<table_and_format>[^/]+?$)",
              new_table,
          ),
      ]
  
file_path: datasette/tests/plugins/my_plugin_2.py
imports: from datasette import hookimpl
  from datasette.utils.asgi import Response
  from functools import wraps
  import markupsafe
  import json
label_desc: Use image node_id 12 for calling a global function with example usage: register_routes(datasette) and returns: list, Response