[Common] Change normal function to Template Function.