How to give PWM to a motor through a digital pin on PYNQ-Z1

As in Arduino we can use commands like analogWrite for writing PWM to a pin to drive a motor, what is the analogous command for PYNQ-Z1?
We tried the codes for Ardumoto and Pmod_PWM, however they don’t specify how to write the generated PWM to a pin.

Can you be more specific? What API do you want to use?