def METHOD_NAME(request, user_id=None):
    """Displays a view of a user's profile.
    Args:
        user_id
            The ID of the user whose profile is being viewed. If not
            specified, show the user's own profile.
    """
    if request.user.is_eighthoffice and "full" not in request.GET and user_id is not None:
        return redirect("eighth_profile", user_id=user_id)
    if user_id is not None:
        if request.user.is_restricted and user_id != request.user.id:
            return render(request, "error/403.html", {"reason": "You do not have permission to view this page."}, status=403)
        profile_user = get_object_or_404(get_user_model(), id=user_id)
    else:
        profile_user = request.user
    num_blocks = 6
    eighth_schedule = []
    #######
    blocks = []
    if settings.ENABLE_HYBRID_EIGHTH and not request.user.is_eighth_admin:
        now = timezone.localtime()
        if now.hour < 17:
            now = now.replace(hour=0, minute=0, second=0, microsecond=0)
        blocks = (
            EighthBlock.objects.exclude(
                eighthscheduledactivity__in=EighthScheduledActivity.objects.filter(activity__name="z - Hybrid Sticky", members__in=[request.user])
            )
            .order_by("date", "block_letter")
            .filter(date__gte=now)[:num_blocks]
        )
    else:
        #######
        start_block = EighthBlock.objects.get_first_upcoming_block()
        if start_block:
            blocks = [start_block] + list(start_block.next_blocks(num_blocks - 1))
    for block in blocks:
        sch = {"block": block}
        try:
            sch["signup"] = EighthSignup.objects.get(scheduled_activity__block=block, user=profile_user)
        except EighthSignup.DoesNotExist:
            sch["signup"] = None
        except MultipleObjectsReturned:
            # TODO: Capture exception
            sch["signup"] = None
        eighth_schedule.append(sch)
    if profile_user.is_eighth_sponsor:
        sponsor = EighthSponsor.objects.get(user=profile_user)
        start_date = get_start_date(request)
        eighth_sponsor_schedule = (
            EighthScheduledActivity.objects.for_sponsor(sponsor).filter(block__date__gte=start_date).order_by("block__date", "block__block_letter")
        )
        eighth_sponsor_schedule = eighth_sponsor_schedule[:10]
    else:
        eighth_sponsor_schedule = None
    admin_or_teacher = request.user.is_eighth_admin or request.user.is_teacher
    can_view_eighth = profile_user.can_view_eighth or request.user == profile_user
    eighth_restricted_msg = not can_view_eighth and admin_or_teacher
    if not can_view_eighth and not request.user.is_eighth_admin and not request.user.is_teacher:
        eighth_schedule = []
    has_been_nominated = (
        profile_user == request.user and request.user.nomination_votes.filter(position__position_name=settings.NOMINATION_POSITION).exists()
    )
    context = {
        "profile_user": profile_user,
        "eighth_schedule": eighth_schedule,
        "can_view_eighth": can_view_eighth,
        "eighth_restricted_msg": eighth_restricted_msg,
        "eighth_sponsor_schedule": eighth_sponsor_schedule,
        "nominations_active": settings.NOMINATIONS_ACTIVE,
        "nomination_position": settings.NOMINATION_POSITION,
        "has_been_nominated": has_been_nominated,
    }
    return render(request, "users/profile.html", context)