In a proceeding about a seaman’s wages, if it is shown that the seaman was convicted during the voyage of an offense by a competent tribunal and sentenced by the tribunal, the court hearing the case may direct that a part of the wages due the seaman, but not more than $15, be applied to reimburse the master for costs properly incurred in procuring the conviction and sentence.