How can matrix transform in slicer using code?

Hi, As a part of the project I added a button in Dicom file that adds fiducials via code and I want to transform those fiducials using matrix transformation via python code. I am new to Slicer and don’t to how to approach this situation.

These examples show how to set transformation matrix in a transform node and how to apply a transform to a node: https://www.slicer.org/wiki/Documentation/Nightly/Modules/Transforms#Examples