def METHOD_NAME(user: AbstractBaseUser, course: CourseBlock) -> bool:
    """
    Check if the user is a staff or instructor for the course.
    """
    return CourseStaffRole(course.id).has_user(user) or CourseInstructorRole(course.id).has_user(user)