code: def get_paginator_resolver(
      cls: t.Type[T], key: str, filters: t.List[dict], collection: str
  ) -> t.Callable[
      [t.Optional[int], t.Optional[str], Info],
      Connection[T, str],
  ]:
      async def paginate(
          search: t.Optional[str],
          first: t.Optional[int] = LIST_LIMIT,
          after: t.Optional[str] = None,
          info: Info = None,
      ):
          def from_db(doc: dict) -> t.Optional[T]:
              doc = cls.modifier(doc)
              return from_dict(cls, doc)
  
          return await get_items(
              info.context.db[collection],
              from_db,
              key,
              filters,
              search,
              first,
              after,
          )
  
      return paginate
  
file_path: fiftyone/fiftyone/server/paginator.py
imports: from bson import ObjectId
  import motor.motor_asyncio
  import typing
  import strawberry
  from strawberry.unset import UNSET
  import fiftyone.core.odm
  from fiftyone.server.constants import LIST_LIMIT
  from fiftyone.server.data import Info, T
  from fiftyone.server.utils import from_dict
label_desc: Use image node_id 1 for calling a global function with example usage: get_paginator_resolver(cls, key, filters, collection) and returns: paginate, unknown, from_dict