<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rename_aesthetics(obj):
 """ Rename aesthetics in obj Parameters obj : dict or list Object that contains aesthetics names Returns ------- obj : dict or list Object that contains aesthetics names """

    if isinstance(obj, dict):
        for name in obj:
            new_name = name.replace('colour', 'color')
            if name != new_name:
                obj[new_name] = obj.pop(name)
    else:
        obj = [name.replace('colour', 'color') for name in obj]

    return obj