Repository: ManimCommunity/manim
File: manim/mobject/mobject.py (Python)

Code before:
        if config["use_opengl_renderer"]:
            if self in mobjects:
                raise Exception("Mobject cannot contain self")
            for mobject in mobjects:
                if mobject not in self.submobjects:
                    self.submobjects.append(mobject)
                if self not in mobject.parents:
                    mobject.parents.append(self)
            self.assemble_family()
            return self
        else:
            for m in mobjects:
                if not isinstance(m, Mobject):
                    raise TypeError("All submobjects must be of type Mobject")
                if m is self:
                    raise ValueError("Mobject cannot contain self")
            self.submobjects = list_update(self.submobjects, mobjects)
            return self

    def __add__(self, mobject):
        raise NotImplementedError

    def __iadd__(self, mobject):
        raise NotImplementedError

    def add_to_back(self, *mobjects) -> "Mobject":
        """Add all passed mobjects to the back of the submobjects.

        If :attr:`submobjects` already contains the given mobjects, they just get moved to the back instead.

        Parameters
        ----------
        mobjects : :class:`Mobject`
            The mobjects to add.

        Returns
        -------
        :class:`Mobject`
            ``self``


        .. note::

            Technically, this is done by adding (or moving) the mobjects to
            the head of :attr:`submobjects`. The head of this list is rendered
            first, which places the corresponding mobjects behind the
            subsequent list members.
        """
        self.remove(*mobjects)
        self.submobjects = list(mobjects) + self.submobjects
        return self

Review comment (suggestion):
```suggestion
    def add_to_back(self, *mobjects: "Mobject") -> "Mobject":
```

Code after:

        """
        if config["use_opengl_renderer"]:
            if self in mobjects:
                raise Exception("Mobject cannot contain self")
            for mobject in mobjects:
                if mobject not in self.submobjects:
                    self.submobjects.append(mobject)
                if self not in mobject.parents:
                    mobject.parents.append(self)
            self.assemble_family()
            return self
        else:
            for m in mobjects:
                if not isinstance(m, Mobject):
                    raise TypeError("All submobjects must be of type Mobject")
                if m is self:
                    raise ValueError("Mobject cannot contain self")
            self.submobjects = list_update(self.submobjects, mobjects)
            return self

    def __add__(self, mobject):
        raise NotImplementedError

    def __iadd__(self, mobject):
        raise NotImplementedError

    def add_to_back(self, *mobjects: "Mobject") -> "Mobject":
        """Add all passed mobjects to the back of the submobjects.

        If :attr:`submobjects` already contains the given mobjects, they just get moved to the back instead.

        Parameters
        ----------
        mobjects
            The mobjects to add.

        Returns
        -------
        :class:`Mobject`
            ``self``


        .. note::

            Technically, this is done by adding (or moving) the mobjects to
            the head of :attr:`submobjects`. The head of this list is rendered
            first, which places the corresponding mobjects behind the
            subsequent list members.
        """
        self.remove(*mobjects)