def METHOD_NAME(self, request):
    """
    Setup course metadata and related database entries for provider state setup.
    """
    course_key = CourseKey.from_string(self.COURSE_KEY)
    self.clean_db(request.user, course_key)
    self.start_modulestore_isolation()
    demo_course = ToyCourseFactory.create(
        org=course_key.org,
        course=course_key.course,
        run=course_key.run,
        display_name="Demonstration Course",
        modulestore=self.store,
        start=datetime(2024, 1, 1, 1, 1, 1),
        end=datetime(2028, 1, 1, 1, 1, 1),
        enrollment_start=datetime(2020, 1, 1, 1, 1, 1),
        enrollment_end=datetime(2028, 1, 1, 1, 1, 1),
        license="all-rights-reserved",
    )
    CourseModeFactory(
        course_id=demo_course.id,
        mode_slug=CourseMode.AUDIT,
    )
    CourseModeFactory(
        course_id=demo_course.id,
        mode_slug=CourseMode.VERIFIED,
        expiration_datetime=datetime(3028, 1, 1),
        min_price=149,
        sku='ABCD1234',
    )
    CourseEnrollment.enroll(request.user, demo_course.id, CourseMode.AUDIT)
    CourseDurationLimitConfig.objects.create(enabled=True, enabled_as_of=datetime(2018, 1, 1))