The way of extracting all material list

Hello, all

While I am studying “dynamo” specifically using python script, it that, I was wondering if it is possible to extract all material list that is shown on Revit Lookup like below figure.
I had tried to solve it creating a python script, but I failed! Please help me.

please share your attempt. It will help those that can help

try this