def replace(self, search_value: Any, new_value: Any) -> StringVar:  # pyright: ignore [reportInconsistentOverload]
        """Replace a string with a value.

        Args:
            search_value: The string to search.
            new_value: The value to be replaced with.

        Returns:
            The string replace operation.
        """
        if not isinstance(search_value, (StringVar, str)):
            raise_unsupported_operand_types("replace", (type(self), type(search_value)))
        if not isinstance(new_value, (StringVar, str)):
            raise_unsupported_operand_types("replace", (type(self), type(new_value)))

        return string_replace_operation(self, search_value, new_value)
Replace a string with a value.

        Args:
            search_value: The string to search.
            new_value: The value to be replaced with.

        Returns:
            The string replace operation.
        
reflex/vars/sequence.py