def is_mobile_available_for_user(user, descriptor):
 return (auth.user_has_role(user, CourseBetaTesterRole(descriptor.id)) or _has_staff_access_to_descriptor(user, descriptor, descriptor.id) or _is_descriptor_mobile_available(descriptor))

def is_mobile_available_for_user ( user , descriptor ) : return ( auth . user_has_role ( user , CourseBetaTesterRole ( descriptor . id ) ) or _has_staff_access_to_descriptor ( user , descriptor , descriptor . id ) or _is_descriptor_mobile_available ( descriptor ) )
returns whether the given course is mobile_available for the given user .