If a witness uses a writing to refresh memory for the purpose of
testifying, either while testifying, or before testifying if the judge
in the judge's discretion determines it is necessary in the interest of
justice, an adverse party is entitled to have the writing produced at
the hearing, to inspect it, to cross-examine the witness thereon, and to
introduce in evidence those portions which relate to the testimony of
the witness. If it is claimed that the writing contains matters not
related to the subject matter of the testimony the judge shall examine
the writing in camera, excise any portion not so related, and order
delivery of the remainder to the party entitled thereto. Any portion
withheld over objections shall be preserved and made available in the
event of review. If a writing is not produced or delivered pursuant to
order under this rule, the judge shall make any order justice requires.