reduce the overhead incurred in FetchTensorData (#4011)
* reduce the overhead incurred in FetchTensorData
* buiulding with changes from master
* renamed a method and also reverted the debug_util methods
* formatting change
* added a comment
* formatting change
* minor naming change
* minor lint check
Co-authored-by: Ubuntu <ubuntu@ip-172-31-8-82.ec2.internal>