<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_referenced_object_as_list( prev_obj, obj, dot_separated_name, desired_type=None):
 """ Same as get_referenced_object, but always returns a list. Args: prev_obj: see get_referenced_object obj: see get_referenced_object dot_separated_name: see get_referenced_object desired_type: see get_referenced_object Returns: same as get_referenced_object, but always returns a list """

    res = get_referenced_object(prev_obj, obj, dot_separated_name,
                                desired_type)
    if res is None:
        return []
    elif type(res) is list:
        return res
    else:
        return [res]