(a)
Any person not subject to this chapter who—
(1)
has been duly subpenaed to appear as a witness before a court-martial, military commission, court of inquiry, or any other military court or board, or before any military or civil officer designated to take a deposition to be read in evidence before such a court, commission, or board;
(2)
has been duly paid or tendered the fees and mileage of a witness at the rates allowed to witnesses attending the courts of the United States; and
(3)
willfully neglects or refuses to appear, or refuses to qualify as a witness or to testify or to produce any evidence which that person may have been legally subpenaed to produce;
is guilty of an offense against the United States.