def attach(self, plot, name=None, connect=True, overwrite=True):
        """Attaches a plot to this manager.

        Args:
            plot: a :class:`fiftyone.core.plots.base.ResponsivePlot`
            name (None): an optional name for the plot
            connect (True): whether to immediately connect the plot
            overwrite (True): whether to overwrite an existing plot of the same
                name
        """
        if not isinstance(plot, ResponsivePlot):
            raise ValueError(
                "Plots must be subclasses of %s; but found %s. You may be "
                "working in an environment that does not support "
                "interactivity.\n\nSee "
                "https://docs.voxel51.com/user_guide/plots.html#overview "
                "for more information" % (ResponsivePlot, type(plot))
            )

        same_plots = [(n, p) for n, p in self._plots.items() if p is plot]
        if same_plots:
            current_name = same_plots[0][0]
            if name is not None and name != current_name:
                logger.warning(
                    "Plot is already attached under name '%s'", current_name
                )

            return

        if name is None:
            name = "plot%d" % (len(self._plots) + 1)

        if name == "session":
            raise ValueError("Cannot use reserved name 'session' for a plot")

        if name in self._plots:
            if not overwrite:
                raise ValueError("A plot with name '%s' already exists" % name)

            _plot = self.pop(name)
            if _plot.is_connected:
                _plot.disconnect()

        self._plots[name] = plot

        if connect:
            if not self.is_connected:
                self.connect()
            else:
                self._connect_plot(name)
                self._update_plots([name])
Attaches a plot to this manager.

        Args:
            plot: a :class:`fiftyone.core.plots.base.ResponsivePlot`
            name (None): an optional name for the plot
            connect (True): whether to immediately connect the plot
            overwrite (True): whether to overwrite an existing plot of the same
                name
        
fiftyone/core/plots/manager.py