<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_enrollment(session, enrollment):
 """Remove an enrollment from the session. This function removes from the session the given enrollment. :param session: database session :param enrollment: enrollment to remove """

    uidentity = enrollment.uidentity
    uidentity.last_modified = datetime.datetime.utcnow()

    session.delete(enrollment)
    session.flush()