<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_velocity_profile(self, v1, v2, distance, min_time):
 """Calculate PVT points that will perform the move within motor params Args: v1 (float):
 Starting velocity in EGUs/s v2 (float):
 Ending velocity in EGUs/s distance (float):
 Relative distance to travel in EGUs min_time (float):
 The minimum time the move should take Returns: tuple: (time_list, position_list) where time_list is a list of relative time points in seconds, and position_list is the position in EGUs that the motor should be """

        # Take off the settle time and distance
        if min_time > 0:
            min_time -= self.velocity_settle
        distance -= self.velocity_settle * v2
        # The ramp time and distance of a continuous ramp from v1 to v2
        ramp_time = self.acceleration_time(v1, v2)
        ramp_distance = self.ramp_distance(v1, v2, ramp_time)
        remaining_distance = distance - ramp_distance
        # Check if we need to stretch in time
        if min_time > ramp_time:
            # Check how fast we would need to be going so that the total move
            # completes in min_time
            pad_velocity = remaining_distance / (min_time - ramp_time)
            if pad_velocity > max(v1, v2):
                # Can't just pad the ramp, make a hat pointing up
                it = self._make_hat(
                    v1, v2, self.acceleration, distance, min_time)
            elif pad_velocity < min(v1, v2):
                # Can't just pad the ramp, make a hat pointing down
                it = self._make_hat(
                    v1, v2, -self.acceleration, distance, min_time)
            else:
                # Make a padded ramp
                it = self._make_padded_ramp(v1, v2, pad_velocity, min_time)
        elif remaining_distance < 0:
            # Make a hat pointing down
            it = self._make_hat(v1, v2, -self.acceleration, distance, min_time)
        else:
            # Make a hat pointing up
            it = self._make_hat(v1, v2, self.acceleration, distance, min_time)
        # Create the time and velocity arrays
        time_array = [0.0]
        velocity_array = [v1]
        for t, v in it:
            assert t >= 0, "Got negative t %s" % t
            if t == 0:
                assert v == velocity_array[-1], \
                    "Can't move velocity in zero time"
                continue
            if v * velocity_array[-1] < 0:
                # Crossed zero, put in an explicit zero velocity
                fraction = velocity_array[-1] / (velocity_array[-1] - v)
                time_array.append(time_array[-1] + fraction * t)
                velocity_array.append(0)
                t -= fraction * t
            time_array.append(time_array[-1] + t)
            velocity_array.append(v)
        # Add on the settle time
        if self.velocity_settle > 0:
            time_array.append(time_array[-1] + self.velocity_settle)
            velocity_array.append(v2)
        return time_array, velocity_array