On the release from custody of a person arrested on a charge of violating any law of the United States or of the Territory of Alaska, but not indicted nor informed against, or indicted or informed against but not convicted, and detained pursuant to chapter 207, or a person held as a material witness, the court in its discretion may direct the United States marshal for the district wherein he is released, pursuant to regulations promulgated by the Attorney General, to furnish the person so released with transportation and subsistence to the place of his arrest, or, at his election, to the place of his bona fide residence if such cost is not greater than to the place of arrest.