A witness summoned by a grand jury shall remain in attendance until excused by the grand jury. A witness summoned in a criminal case shall remain available for attendance until the case for which he or she was summoned is disposed of or until he or she is excused by the court. A witness who departs without permission of the court shall be in criminal contempt of court.