<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_colour(index):
 """ get color number index. """

    colours = [
        'red', 'blue', 'green', 'pink',
        'yellow', 'magenta', 'orange', 'cyan',
    ]
    default_colour = 'purple'
    if index < len(colours):
        return colours[index]
    else:
        return default_colour