simplify and refactor pull routine
pull_routine function is called outside of the class, at here. Therefore, it is defined as a static function. It is also called within the class. In turn, there are
if rpc_call: statements everywhere. Furthermore, we are unable to call any other instance function in it, as it is a static function.
Define two separate functions: one for calling pull routine functionality from outside of the class, one for calling it from inside of the class. This way, we hope the code will be more readable and we will preserve the common sense in function parameter order (currently
self is in the middle).