<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_trip( self, smooth, smooth_strategy, smooth_noise, seg, seg_eps, seg_min_time, simplify, simplify_max_dist_error, simplify_max_speed_error ):
 """In-place, transformation of a track into a trip A trip is a more accurate depiction of reality than a track. For a track to become a trip it need to go through the following steps: + noise removal + smoothing + spatio-temporal segmentation + simplification At the end of these steps we have a less noisy, track that has less points, but that holds the same information. It's required that each segment has their metrics calculated or has been preprocessed. Args: name: An optional string with the name of the trip. If none is given, one will be generated by generateName Returns: This Track instance """


        self.compute_metrics()
        self.remove_noise()

        print (smooth, seg, simplify)
        if smooth:
            self.compute_metrics()
            self.smooth(smooth_strategy, smooth_noise)

        if seg:
            self.compute_metrics()
            self.segment(seg_eps, seg_min_time)

        if simplify:
            self.compute_metrics()
            self.simplify(0, simplify_max_dist_error, simplify_max_speed_error)

        self.compute_metrics()

        return self