code: def send(self, raw_data = None):
          
          if self.__report_kind != HidP_Output \
                  and self.__report_kind != HidP_Feature:
              raise HIDError("Only for output or feature reports")
          #valid length
          if raw_data and (len(raw_data) != self.__raw_report_size):
              raise HIDError("Report size has to be %d elements (bytes)" \
                  % self.__raw_report_size)
          #should be valid report id
          if raw_data and raw_data[0] != self.__report_id.value:
              #hint, raw_data should be a plain list of integer values
              raise HIDError("Not matching report id")
          #
          if self.__report_kind != HidP_Output and \
                  self.__report_kind != HidP_Feature:
              raise HIDError("Can only send output or feature reports")
          #
          if not raw_data:
              # we'll construct the raw report
              self.__prepare_raw_data()
          elif not ( isinstance(raw_data, ctypes.Array) and \
                  issubclass(raw_data._type_, c_ubyte) ):
              # pre-memory allocation for performance
              self.__alloc_raw_data(raw_data)
          #reference proper object
          raw_data = self.__raw_data
          if self.__report_kind == HidP_Output:
              return self.__hid_object.send_output_report(raw_data)
          elif self.__report_kind == HidP_Feature:
              return self.__hid_object.send_feature_report(raw_data)
          else:
              pass
docs: Prepare HID raw report (unless raw_data is provided) and send
          it to HID device