def invalidate_generated_certificates(course_id, enrolled_students, certificate_statuses):
 certificates = GeneratedCertificate.objects.filter(user__in=enrolled_students, course_id=course_id, status__in=certificate_statuses)
 certificates.update(status=CertificateStatuses.unavailable, verify_uuid='', download_uuid='', download_url='', grade='')

def invalidate_generated_certificates ( course_id , enrolled_students , certificate_statuses ) : certificates = GeneratedCertificate . objects . filter ( user__in = enrolled_students , course_id = course_id , status__in = certificate_statuses ) certificates . update ( status = CertificateStatuses . unavailable , verify_uuid = '' , download_uuid = '' , download_url = '' , grade = '' )
invalidate generated certificates for all enrolled students in the given course having status in certificate_statuses .