Please see if you can define a function to handle this and call that function here, to reduce the number of code lines in this function.
Please see if you can define a function to handle this and call that function here, to reduce the number of code lines in this function.