How to set up a pre request script in postman

How to setup a Pre-request script in postman?

Pre-request script in Postman documentation by b.ignited