code: def define_as_output(self, pin):
          
          self._validate_channel(pin)
          # Set bit to 1 for input or 0 for output.
          self.iodir[int(pin/8)] &= ~(1 << (int(pin%8)))
          self._write_iodir()
docs: Set the input or output mode for a specified pin.  Mode should be
          either GPIO.OUT or GPIO.IN.