Tuning memory behavior from volatile to nonvolatile by increasing the linear segment length of hyperbranched copolyimides