In the course of or in connection with any proceeding under this section, or in connection with any claim for insured deposits or any examination or investigation under section
1820
(c) of this title, the agency conducting the proceeding, examination, or investigation or considering the claim for insured deposits, or any member or designated representative thereof, including any person designated to conduct any hearing under this section, shall have the power to administer oaths and affirmations, to take or cause to be taken depositions, and to issue, revoke, quash, or modify subpenas and subpenas duces tecum; and such agency is empowered to make rules and regulations with respect to any such proceedings, claims, examinations, or investigations. The attendance of witnesses and the production of documents provided for in this subsection may be required from any place in any State or in any territory or other place subject to the jurisdiction of the United States at any designated place where such proceeding is being conducted. Any such agency or any party to proceedings under this section may apply to the United States District Court for the District of Columbia, or the United States district court for the judicial district or the United States court in any territory in which such proceeding is being conducted, or where the witness resides or carries on business, for enforcement of any subpena or subpena duces tecum issued pursuant to this subsection, and such courts shall have jurisdiction and power to order and require compliance therewith. Witnesses subpenaed under this subsection shall be paid the same fees and mileage that are paid witnesses in the district courts of the United States. Any court having jurisdiction of any proceeding instituted under this section by an insured depository institution or a director or officer thereof, may allow to any such party such reasonable expenses and attorneys’ fees as it deems just and proper; and such expenses and fees shall be paid by the depository institution or from its assets. Any person who willfully shall fail or refuse to attend and testify or to answer any lawful inquiry or to produce books, papers, correspondence, memoranda, contracts, agreements, or other records, if in such person’s power so to do, in obedience to the subpoena of the appropriate Federal banking agency, shall be guilty of a misdemeanor and, upon conviction, shall be subject to a fine of not more than $1,000 or to imprisonment for a term of not more than one year or both.