from typing import Any
import inspect
from pydantic import BaseModel  # noqa: E0611


def _is_basemodel(obj: Any) -> bool:
    """Checks if object is a subclass of BaseModel.

    Args:
        obj (Any): Any object

    Returns:
        bool: Is a subclass of BaseModel.
    """
    return inspect.isclass(obj) and issubclass(obj, BaseModel)