I feel we should refactorize all the comput_input_stat, as almost all the classes implement the method in exactly the same way.
Shall we consider firstly refactorize the pt backend and then implement the python backend?
Originally posted by @wanghan-iapcm in #4729 (review)