def METHOD_NAME(certificate: ProgramCertificate) -> Dict:
    """Build a credential object for a ProgramCertificate"""
    start_date, end_date = certificate.start_end_dates
    if not start_date or not end_date:
        raise Exception("Program has no start or end date")
    if not certificate.program.page:
        raise Exception("Program has no CMS program page")
    if not certificate.program.page.certificate_page:
        raise Exception("Program has no CMS program certificate page")
    if not certificate.program.page.certificate_page.CEUs:
        raise Exception("Program has no CEUs defined")
    return {
        "type": ["EducationalOccupationalCredential", "ProgramCompletionCredential"],
        "name": f"{certificate.program.title} Completion",
        "description": certificate.program.page.description,
        "awardedOnCompletionOf": {
            "identifier": certificate.program.text_id,
            "type": "EducationalOccupationalProgram",
            "name": certificate.program.title,
            "description": certificate.program.page.description,
            "numberOfCredits": {
                "value": certificate.program.page.certificate_page.CEUs
            },
            "startDate": start_date.isoformat(),
            "endDate": end_date.isoformat(),
        },
    }