By written stipulation of the parties, the testimony of any witness of either party may be filed in the form of an affidavit by such witness or the parties may agree what a particular witness would testify to if his deposition were taken. Such testimonial affidavits or stipulations shall be filed within the time limits prescribed for the taking of testimony in section
386 of this title.