<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def truncate(self, max_length):
 """Truncate this vector so it's length does not exceed max."""


        if self.length() > max_length:

            # If it's longer than the max_length, scale to the max_length.
            self.scale(max_length / self.length())