<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_samples(self, sr=None, offset=0, duration=None):
 """ Read the samples of the utterance. Args: sr (int):
 If None uses the sampling rate given by the track, otherwise resamples to the given sampling rate. offset (float):
 Offset in seconds to read samples from. duration (float):
 If not ``None`` read only this number of seconds in maximum. Returns: np.ndarray: A numpy array containing the samples as a floating point (numpy.float32) time series. """


        read_duration = self.duration

        if offset > 0 and read_duration is not None:
            read_duration -= offset

        if duration is not None:
            if read_duration is None:
                read_duration = duration
            else:
                read_duration = min(duration, read_duration)

        return self.track.read_samples(
            sr=sr,
            offset=self.start + offset,
            duration=read_duration
        )