<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unravel_staff(staff_data):
 """Unravels staff role dictionary into flat list of staff members with ``role`` set as an attribute. Args: staff_data(dict):
 Data return from py:method::get_staff Returns: list: Flat list of staff members with ``role`` set to role type (i.e. course_admin, instructor, TA, etc) """

        staff_list = []
        for role, staff_members in staff_data['data'].items():
            for member in staff_members:
                member['role'] = role
                staff_list.append(member)
        return staff_list