<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_events_in_signal(signal, events_onsets, color="red", marker=None):
 """ Plot events in signal. Parameters signal : array or DataFrame Signal array (can be a dataframe with many signals). events_onsets : list or ndarray Events location. color : int or list Marker color. marker : marker or list of markers (for possible marker values, see: https://matplotlib.org/api/markers_api.html) Marker type. Example Notes *Authors* - `Dominique Makowski <https://dominiquemakowski.github.io/>`_ - `Renatosc <https://github.com/renatosc/>`_ *Dependencies* - matplotlib - pandas """


    df = pd.DataFrame(signal)
    ax = df.plot()

    def plotOnSignal(x, color, marker=None):
        if (marker is None):
            plt.axvline(x=event, color=color)
        else:
            plt.plot(x, signal[x], marker, color=color)


    events_onsets = np.array(events_onsets)
    try:
        len(events_onsets[0])
        for index, dim in enumerate(events_onsets):
            for event in dim:
                plotOnSignal(x=event,
                             color=color[index] if isinstance(color, list) else color,
                             marker=marker[index] if isinstance(marker, list) else marker)
    except TypeError:
        for event in events_onsets:
            plotOnSignal(x=event,
                         color=color[0] if isinstance(color, list) else color,
                         marker=marker[0] if isinstance(marker, list) else marker)
    return ax