Synthesis and non-volatile electrical memory characteristics of triphenylamine-based polyimides with flexibility segments