code: def test_get_model_config():
      # For coverage in Pydantic v2
      class Foo(BaseModel):
          model_config = ConfigDict(from_attributes=True)
  
      foo = Foo()
      config = _get_model_config(foo)
      assert config == {"from_attributes": True}
  
file_path: fastapi/tests/test_compat.py
imports: from typing import List, Union
  from fastapi import FastAPI, UploadFile
  from fastapi._compat import ModelField, Undefined, _get_model_config, is_bytes_sequence_annotation, is_uploadfile_sequence_annotation
  from fastapi.testclient import TestClient
  from pydantic import BaseConfig, BaseModel, ConfigDict
  from pydantic.fields import FieldInfo
  from .utils import needs_pydanticv1, needs_pydanticv2
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_model_config() without return types