def METHOD_NAME(self, request, *args, **kwargs):
    course_key_string = kwargs.METHOD_NAME('course_key_string')
    course_key = CourseKey.from_string(course_key_string)
    original_user_is_global_staff = self.request.user.is_staff
    original_user_is_staff = has_access(request.user, 'staff', course_key).has_access
    course = course_detail(request, request.user.username, course_key)
    # We must compute course load access *before* setting up masquerading,
    # else course staff (who are not enrolled) will not be able view
    # their course from the perspective of a learner.
    load_access = check_course_access(
        course,
        request.user,
        'load',
        check_if_enrolled=True,
        check_if_authenticated=True,
        apply_enterprise_checks=True,
    )
    _, request.user = setup_masquerade(
        request,
        course_key,
        staff_access=original_user_is_staff,
        reset_masquerade_data=True,
    )
    username = request.user.username if request.user.username else None
    enrollment = CourseEnrollment.get_enrollment(request.user, course_key_string)
    user_is_enrolled = bool(enrollment and enrollment.is_active)
    # User locale settings
    user_timezone_locale = user_timezone_locale_prefs(request)
    user_timezone = user_timezone_locale['user_timezone']
    browser_timezone = self.request.query_params.METHOD_NAME('browser_timezone', None)
    celebrations = get_celebrations_dict(
        request.user, enrollment, course, user_timezone if not None else browser_timezone
    )
    # Record course goals user activity for (web) learning mfe course tabs
    UserActivity.record_user_activity(request.user, course_key)
    data = {
        'course_id': course.id,
        'username': username,
        'is_staff': has_access(request.user, 'staff', course_key).has_access,
        'original_user_is_staff': original_user_is_staff,
        'number': course.display_number_with_default,
        'org': course.display_org_with_default,
        'start': course.start,
        'tabs': get_course_tab_list(request.user, course),
        'title': course.display_name_with_default,
        'is_self_paced': getattr(course, 'self_paced', False),
        'is_enrolled': user_is_enrolled,
        'course_access': load_access.to_json(),
        'celebrations': celebrations,
        'user_timezone': user_timezone,
        'can_view_certificate': certificates_viewable_for_course(course),
    }
    context = self.get_serializer_context()
    context['course'] = course
    context['course_overview'] = course
    context['enrollment'] = enrollment
    serializer = self.get_serializer_class()(data, context=context)
    return Response(serializer.data)