Synthesis of high surface area polyimides