code: def get_query(
      background_tasks: BackgroundTasks, q: Union[str, None] = None
  ):
      if q:
          message = f"found query: {q}\n"
          background_tasks.add_task(write_log, message)
      return q
  
imports: from typing import Union
  from fastapi import BackgroundTasks, Depends, FastAPI
  from typing_extensions import Annotated
label_desc: Use image node_id 2 for calling a global function with example usage: get_query(background_tasks, q) and returns: q