def trim(self, start_time, end_time=None):
if not is_number(start_time) or start_time < <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>effect_args = [<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(start_time)<EOL>]<EOL>if end_time is not None:<EOL><INDENT>if not is_number(end_time) or end_time < <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if start_time >= end_time:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>effect_args.append('<STR_LIT>'.format(end_time - start_time))<EOL><DEDENT>self.effects.extend(effect_args)<EOL>self.effects_log.append('<STR_LIT>')<EOL>return self<EOL>
Excerpt a clip from an audio file, given the start timestamp and end timestamp of the clip within the file, expressed in seconds. If the end timestamp is set to `None` or left unspecified, it defaults to the duration of the audio file.

        Parameters
        ----------
        start_time : float
            Start time of the clip (seconds)
        end_time : float or None, default=None
            End time of the clip (seconds)