<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def simplify(self, eps, max_dist_error, max_speed_error, topology_only=False):
 """ In-place segment simplification See `drp` and `compression` modules Args: eps (float):
 Distance threshold for the `drp` function max_dist_error (float):
 Max distance error, in meters max_speed_error (float):
 Max speed error, in km/h topology_only (bool, optional):
 True to only keep topology, not considering times when simplifying. Defaults to False. Returns: :obj:`Segment` """

        if topology_only:
            self.points = drp(self.points, eps)
        else:
            self.points = spt(self.points, max_dist_error, max_speed_error)
        return self