This requires recently added implementation of machine.Pin from micropython-lib.
Showing and providing detailed instructions and motivation.