<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_custom_annotations_for_alias(data_type):
 """ Given a Stone data type, returns all custom annotations applied to it. """

    # annotations can only be applied to Aliases, but they can be wrapped in
    # Nullable. also, Aliases pointing to other Aliases don't automatically
    # inherit their custom annotations, so we might have to traverse.
    result = []
    data_type, _ = unwrap_nullable(data_type)
    while is_alias(data_type):
        result.extend(data_type.custom_annotations)
        data_type, _ = unwrap_nullable(data_type.data_type)
    return result