def __new__(
        cls,
        name: str,
        bases: tuple[type],
        namespace: dict[str, Any],
        mixin: bool = False,
    ) -> type:
        """Create a new class.

        Args:
            name: The name of the class.
            bases: The bases of the class.
            namespace: The namespace of the class.
            mixin: Whether the class is a mixin and should not be instantiated.

        Returns:
            The new class.
        """
        state_bases = [
            base for base in bases if issubclass(base, EvenMoreBasicBaseState)
        ]
        mixin = mixin or (
            bool(state_bases) and all(base._mixin for base in state_bases)
        )
        # Add the field to the class
        inherited_fields: dict[str, Field] = {}
        own_fields: dict[str, Field] = {}
        resolved_annotations = types.resolve_annotations(
            namespace.get("__annotations__", {}), namespace["__module__"]
        )

        for base in bases[::-1]:
            if hasattr(base, "__inherited_fields__"):
                inherited_fields.update(base.__inherited_fields__)
        for base in bases[::-1]:
            if hasattr(base, "__own_fields__"):
                inherited_fields.update(base.__own_fields__)

        for key, value in [
            (key, value)
            for key, value in namespace.items()
            if key not in resolved_annotations
        ]:
            if isinstance(value, Field):
                if value.annotated_type is not Any:
                    new_value = value
                elif value.default is not MISSING:
                    new_value = Field(
                        default=value.default,
                        is_var=value.is_var,
                        annotated_type=figure_out_type(value.default),
                    )
                else:
                    new_value = Field(
                        default_factory=value.default_factory,
                        is_var=value.is_var,
                        annotated_type=Any,
                    )
            elif (
                not key.startswith("__")
                and not callable(value)
                and not isinstance(value, (staticmethod, classmethod, property, Var))
            ):
                if types.is_immutable(value):
                    new_value = Field(
                        default=value,
                        annotated_type=figure_out_type(value),
                    )
                else:
                    new_value = Field(
                        default_factory=functools.partial(copy.deepcopy, value),
                        annotated_type=figure_out_type(value),
                    )
            else:
                continue

            own_fields[key] = new_value

        for key, annotation in resolved_annotations.items():
            value = namespace.get(key, MISSING)

            if types.is_classvar(annotation):
                # If the annotation is a classvar, skip it.
                continue

            if value is MISSING:
                value = Field(
                    annotated_type=annotation,
                )
            elif not isinstance(value, Field):
                if types.is_immutable(value):
                    value = Field(
                        default=value,
                        annotated_type=annotation,
                    )
                else:
                    value = Field(
                        default_factory=functools.partial(copy.deepcopy, value),
                        annotated_type=annotation,
                    )
            else:
                value = Field(
                    default=value.default,
                    default_factory=value.default_factory,
                    is_var=value.is_var,
                    annotated_type=annotation,
                )

            own_fields[key] = value

        namespace["__own_fields__"] = own_fields
        namespace["__inherited_fields__"] = inherited_fields
        namespace["__fields__"] = inherited_fields | own_fields
        namespace["_mixin"] = mixin
        return super().__new__(cls, name, bases, namespace)
Create a new class.

        Args:
            name: The name of the class.
            bases: The bases of the class.
            namespace: The namespace of the class.
            mixin: Whether the class is a mixin and should not be instantiated.

        Returns:
            The new class.
        
reflex/vars/base.py