def get_assignment_lock_date(course, assignment):
    "Takes a course object and the name of a Canvas assignment and returns the due date. Returns None if no due date assigned.\n    \n    Example:\n    course.get_assignment_due_date('worksheet_01')"
    assignments = get_assignments(course)
    assignments = assignments[['name', 'lock_at']].query('name == @assignment')
    lock_date = assignments['lock_at'].to_numpy()[0]
    if (lock_date is None):
        return lock_date
    lock_date = lock_date.replace('T', '-')
    lock_date = lock_date.replace(':', '-')
    return lock_date[:16]
Takes a course object and the name of a Canvas assignment and returns the due date. Returns None if no due date assigned.

Example:
course.get_assignment_due_date('worksheet_01')
def get_assignment_lock_date(course, assignment):
    "Takes a course object and the name of a Canvas assignment and returns the due date. Returns None if no due date assigned.\n    \n    Example:\n    course.get_assignment_due_date('worksheet_01')"
    assignments = get_assignments(course)
    assignments = assignments[['name', 'lock_at']].query('name == @assignment')
    lock_date = assignments['lock_at'].to_numpy()[0]
    if (lock_date is None):
        return lock_date
    lock_date = lock_date.replace('T', '-')
    lock_date = lock_date.replace(':', '-')
    return lock_date[:16]