code: def get_item(item_id: str, user_id: Optional[str] = None):
      if user_id is None:
          return {"item_id": item_id}
      else:
          return {"item_id": item_id, "user_id": user_id}
  
file_path: fastapi/tests/test_infer_param_optionality.py
imports: from typing import Optional
  from dirty_equals import IsDict
  from fastapi import APIRouter, FastAPI
  from fastapi.testclient import TestClient
label_desc: Use image node_id 4 for calling a global function with example usage: get_item(item_id, user_id) and returns: dict, dict