Finally get the StackOverflow solution https://stackoverflow.com/q/52251945/6141587