<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _plotting_decimation(trace, max_len=10e5, decimation_step=4):
 """ Decimate data until required length reached. :type trace: obspy.core.stream.Trace :param trace: Trace to decimate type max_len: int :param max_len: Maximum length in samples :type decimation_step: int :param decimation_step: Decimation factor to use for each step. :return: obspy.core.stream.Trace .. rubric: Example 63 """

    trace_len = trace.stats.npts
    while trace_len > max_len:
        trace.decimate(decimation_step)
        trace_len = trace.stats.npts
    return trace