<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot(self, channel_names, kind='histogram', gates=None, gate_colors=None, gate_lw=1, **kwargs):
 """Plot the flow cytometry data associated with the sample on the current axis. To produce the plot, follow up with a call to matplotlib's show() function. Parameters {graph_plotFCM_pars} {FCMeasurement_plot_pars} {common_plot_ax} gates : [None, Gate, list of Gate] Gate must be of type {_gate_available_classes}. gate_lw: float | iterable line width to use when drawing gates if float, uses the same line width for all gates if iterable, then cycles between the values kwargs : dict Additional keyword arguments to be passed to graph.plotFCM Returns ------- None : if no data is present plot_output : output of plot command used to draw (e.g., output of hist) Examples -------- """

        ax = kwargs.get('ax')

        channel_names = to_list(channel_names)
        gates = to_list(gates)

        plot_output = graph.plotFCM(self.data, channel_names, kind=kind, **kwargs)

        if gates is not None:
            if gate_colors is None:
                gate_colors = cycle(('b', 'g', 'r', 'm', 'c', 'y'))

            if not isinstance(gate_lw, collections.Iterable):
                gate_lw = [gate_lw]

            gate_lw = cycle(gate_lw)

            for (g, c, lw) in zip(gates, gate_colors, gate_lw):
                g.plot(ax=ax, ax_channels=channel_names, color=c, lw=lw)

        return plot_output