code: def object_factory():
      from aim.web.api.projects.project import Project
  
      project = Project()
      if not project.exists():
          raise HTTPException(status_code=404)
  
      return project.repo.structured_db
  
file_path: aim/aim/web/api/utils.py
imports: import datetime
  import pytz
  from fastapi import APIRouter
  from fastapi import HTTPException
  from fastapi.types import DecoratedCallable
  from starlette.types import ASGIApp, Receive, Scope, Send
  from typing import Any, Callable
label_desc: Use image node_id 1 for calling a global function with example usage: object_factory() and returns: project