Making modification on Blueprint code

I am trying to make the node “LineTraceComponent” return the physical material with the bone name how can I do it?
I know it is doable since the linetracebychannel node outhit pin contains physical material.

I did find the source for both nods but when I try to implement it in BP function library lots of compile errors are there.