code: def extra_body_script(
      template, database, table, view_name, columns, request, datasette
  ):
      async def inner():
          script = "var extra_body_script = {};".format(
              json.dumps(
                  {
                      "template": template,
                      "database": database,
                      "table": table,
                      "config": datasette.plugin_config(
                          "name-of-plugin",
                          database=database,
                          table=table,
                      ),
                      "view_name": view_name,
                      "request_path": request.path
                      if request is not None
                      else None,
                      "added": (
                          await datasette.get_database().execute(
                              "select 3 * 5"
                          )
                      ).first()[0],
                      "columns": columns,
                  }
              )
          )
          return {"script": script, "module": True}
  
      return inner
  
imports: import asyncio
  from datasette import hookimpl, Permission
  from datasette.facets import Facet
  from datasette import tracer
  from datasette.utils import path_with_added_args
  from datasette.utils.asgi import asgi_send_json, Response
  import base64
  import pint
  import json
label_desc: Use image node_id 4 for calling a global function with example usage: extra_body_script(template, database, table, view_name, columns, request, datasette) and returns: inner, dict