docs: def read_digital_pin(self, pin_number, dest_addr_long=None):
          """
          Fetches a sample and returns the boolean value of the requested digital
          pin.
          """
          sample = self.get_sample(dest_addr_long=dest_addr_long)
          try:
              return sample[const.DIGITAL_PINS[pin_number]]
          except KeyError:
              raise exceptions.ZigBeePinNotConfigured(
                  "Pin %s (%s) is not configured as a digital input or output."
                  % (pin_number, const.IO_PIN_COMMANDS[pin_number]))