code: def test_validator_is_cloned(client: TestClient):
      with pytest.raises(ResponseValidationError) as err:
          client.get("/model/modelX")
      assert err.value.errors() == [
          IsDict(
              {
                  "type": "value_error",
                  "loc": ("response", "name"),
                  "msg": "Value error, name must end in A",
                  "input": "modelX",
                  "ctx": {
                      "error": HasRepr(
                          "ValueError('name must end in A')"
                      )
                  },
                  "url": match_pydantic_error_url("value_error"),
              }
          )
          | IsDict(
              # TODO remove when deprecating Pydantic v1
              {
                  "loc": ("response", "name"),
                  "msg": "name must end in A",
                  "type": "value_error",
              }
          )
      ]
  
file_path: fastapi/tests/test_filter_pydantic_sub_model_pv2.py
imports: from typing import Optional
  import pytest
  from dirty_equals import HasRepr, IsDict, IsOneOf
  from fastapi import Depends, FastAPI
  from fastapi.exceptions import ResponseValidationError
  from fastapi.testclient import TestClient
  from fastapi.utils import match_pydantic_error_url
  from .utils import needs_pydanticv2
label_desc: Use image node_id 3 for calling a global function with example usage: test_validator_is_cloned(client) without return types