S1 SAR processing with python: Code errors

I am trying to process a S1 SAR image in order to get backscatter values for my image analysis. My code keeps giving me this error: “GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
NameError: name ‘GPF’ is not defined” for the following line in my code. Any suggestions please. I am a begginer with python.

GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
HashMap = snappy.jpy.get_type(‘java.util.HashMap’)

You need to import GPF.
Add

from snappy import GPF

And you don’t need to load the operators since SNAP 5.

GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()