def _validate_course(course: str) ->str:
    """Validates course is a four digit number,
     otherwise adds zero(s) to create four digit number or,
     raises an exception.
     """
    if len(course) > 4 or not course.isdigit():
        raise ValueError('Invalid course number')
    elif len(course) == 4:
        return course
    return '0' * (4 - len(course)) + course
