code: def get_mode(self, gpio):
          
          res = yield from self._pigpio_aio_command(_PI_CMD_MODEG, gpio, 0)
          return _u2i(res)
docs: Returns the gpio mode.
  
          gpio:= 0-53.
  
          Returns a value as follows
  
          . .
          0 = INPUT
          1 = OUTPUT
          2 = ALT5
          3 = ALT4
          4 = ALT0
          5 = ALT1
          6 = ALT2
          7 = ALT3
          . .
  
          ...
          print(pi.get_mode(0))
          4
          ...