code: def _get_primary_key(model_type: Type["SQLModel"]) -> str:
      primary_keys = sqlalchemy_inspect(model_type).primary_key
  
      if len(primary_keys) != 1:
          raise ValueError(
              f"The model {model_type.__name__} should have a single primary key field."
          )
  
      return primary_keys[0].name
  
imports: import functools
  import json
  import pathlib
  from typing import Any, Dict, Generic, List, Type, TypeVar
  from fastapi import Response, status
  from fastapi.encoders import jsonable_encoder
  from lightning_utilities.core.imports import RequirementCache
  from pydantic import BaseModel, parse_obj_as
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.imports import _is_sqlmodel_available
label_desc: Use image node_id 2 for calling a global function with example usage: _get_primary_key(model_type) and returns: primary_keys