N.Y. Criminal Procedure Law § 200.20
2. Two offenses are "joinable" when:
3. In any case where two or more offenses or groups of offenses charged in an indictment are based upon different criminal transactions, and where their joinability rests solely upon the fact that such offenses, or as the case may be at least one offense of each group, are the same or similar in law, as prescribed in paragraph (c) of subdivision two, the court, in the interest of justice and for good cause shown, may, upon application of either a defendant or the people, in its discretion, order that any such offenses be tried separately from the other or others thereof. Good cause shall include but not be limited to situations where there is:
(b) A convincing showing that a defendant has both important testimony to give concerning one count and a genuine need to refrain from testifying on the other, which satisfies the court that the risk of prejudice is substantial.
6. Where an indictment charges at least one offense against a defendant who was under the age of seventeen, or commencing October first, two thousand nineteen, eighteen at the time of the commission of the crime and who did not lack criminal responsibility for such crime by reason of infancy, the indictment may, in addition, charge in separate counts one or more other offenses for which such person would not have been criminally responsible by reason of infancy, if: