def _serialize_type(type_: Any) -> str:
    """Serialize a type.

    Args:
        type_: The type to serialize.

    Returns:
        The serialized type.
    """
    if not inspect.isclass(type_):
        return f"{type_}"
    return f"{type_.__module__}.{type_.__qualname__}"
Serialize a type.

    Args:
        type_: The type to serialize.

    Returns:
        The serialized type.
    
reflex/state.py