'Serialize the Certificate object\'s locally-stored certificate data to a JSON representation
We use direct access here for specific keys in order to enforce their presence'

@staticmethod
def serialize_certificate(certificate):

    certificate_data = certificate.certificate_data
    certificate_response = {'id': certificate_data['id'], 'name': certificate_data['name'], 'description': certificate_data['description'], 'is_active': certificate_data['is_active'], 'version': CERTIFICATE_SCHEMA_VERSION, 'signatories': certificate_data['signatories']}
    if certificate_data.get('course_title'):
        certificate_response['course_title'] = certificate_data['course_title']
    return certificate_response
