convert key store size test into python from bash