'Checks whether the content is gated for learners. If so,
returns a banner_text depending on whether user is staff.'

def _gated_content_staff_banner(self):

    milestones_service = self.runtime.service(self, 'milestones')
    if milestones_service:
        content_milestones = milestones_service.get_course_content_milestones(self.course_id, self.location, 'requires')
        banner_text = _('This    subsection    is    unlocked    for    learners    when    they    meet    the    prerequisite    requirements.')
        if (content_milestones and self.runtime.user_is_staff):
            return banner_text
