code: def render_cell(
      row, value, column, table, database, datasette, request
  ):
      async def inner():
          # Render some debug output in cell with value RENDER_CELL_DEMO
          if value == "RENDER_CELL_DEMO":
              data = {
                  "row": dict(row),
                  "column": column,
                  "table": table,
                  "database": database,
                  "config": datasette.plugin_config(
                      "name-of-plugin",
                      database=database,
                      table=table,
                  ),
              }
              if request.args.get("_render_cell_extra"):
                  data["render_cell_extra"] = 1
              return json.dumps(data)
          elif value == "RENDER_CELL_ASYNC":
              return (
                  await datasette.get_database(database).execute(
                      "select 'RENDER_CELL_ASYNC_RESULT'"
                  )
              ).single_value()
  
      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 5 for calling a global function with example usage: render_cell(row, value, column, table, database, datasette, request) and returns: inner, json, unknown