How to invert a GPIO pin on the STM32F401RE Nucleo?

I require to invert one of the GPIO pins for some code I am running but can’t seem to get it work. If anyone can assist it would be appreciated.

What does ‘invert one of the GPIOs’ mean? Do you have some code?