[Paid] Fix Python material generation

$50 if you can help me fix this:

Need solution in Python as this is for an automation pipeline.