def METHOD_NAME(enrollment_open=True):
    """Set up a restricted section unrelated to demo_user."""
    call_command("createtestuser")
    # set up section
    mentor_user = User.objects.create(
        username="testmentor",
        first_name="Test",
        last_name="Mentor",
        email="testmentor@berkeley.edu",
    )
    if enrollment_open:
        cs61a = Course.objects.create(
            name="CS61A",
            title="Structure and Interpretation of Computer Programs",
            permitted_absences=2,
            enrollment_start=now_minus(30),
            section_start=now_minus(15),
            enrollment_end=now_plus(15),
            valid_until=now_plus(30),
            is_restricted=True,  # restricted course
        )
    else:
        cs61a = Course.objects.create(
            name="CS61A",
            title="Structure and Interpretation of Computer Programs",
            permitted_absences=2,
            enrollment_start=now_plus(16),
            section_start=now_plus(30),
            enrollment_end=now_plus(45),
            valid_until=now_plus(60),
            is_restricted=True,  # restricted course
        )
    mentor = Mentor.objects.create(user=mentor_user, course=cs61a)
    section = Section.objects.create(
        mentor=mentor, capacity=5, description="test section"
    )
    Spacetime.objects.create(
        section=section,
        day_of_week="Monday",
        start_time="11:00:00",
        duration="01:00:00",
        location="Cory 400",
    )
    Spacetime.objects.create(
        section=section,
        day_of_week="Tuesday",
        start_time="14:00:00",
        duration="01:00:00",
        location="Soda 380",
    )