@Bedson - sure thing, it is quite easy to do in IfcOpenShell with a few lines of code:
import ifcopenshell
f = ifcopenshell.open('New_Test_From_B3D_17.ifc')
guids = ['3DY1onMen8w9TPwKVoKsIA', '10iXd65697Wg1uFQ8pHayO']
for element in [f.by_guid(guid) for guid in guids]:
print(element)
for material in [a.RelatingMaterial for a in element.HasAssociations if a.is_a('IfcRelAssociatesMaterial')]:
print(material)
The output for your file is:
#2257=IfcPipeFitting('3DY1onMen8w9TPwKVoKsIA',#20,'Cylinder',$,$,#2248,#2256,$,.BEND.)
#2213=IfcMaterial('0BV_Cylinder',$,$)
#2271=IfcBuildingElementProxy('10iXd65697Wg1uFQ8pHayO',#20,'Suzanne',$,$,#2262,#2270,$,.COMPLEX.)
#2221=IfcMaterial('0BV_Monkey',$,$)