def is_certificate_invalid(student, course_key):
 is_invalid = False
 certificate = GeneratedCertificate.certificate_for_student(student, course_key)
 if (certificate is not None):
  is_invalid = CertificateInvalidation.has_certificate_invalidation(student, course_key)
 return is_invalid

def is_certificate_invalid ( student , course_key ) : is_invalid = False certificate = GeneratedCertificate . certificate_for_student ( student , course_key ) if ( certificate is not None ) : is_invalid = CertificateInvalidation . has_certificate_invalidation ( student , course_key ) return is_invalid
check that whether the student in the course has been invalidated for receiving certificates .