code: def __get_vibration_code(self, left_motor, right_motor, duration):
          
          inner_event = struct.pack(
              '2h6x2h2x2H28x',
              0x50,
              -1,
              duration,
              0,
              int(left_motor * 65535),
              int(right_motor * 65535))
          buf_conts = ioctl(self._write_device, 1076905344, inner_event)
          return int(codecs.encode(buf_conts[1:3], 'hex'), 16)
docs: This is some crazy voodoo, if you can simplify it, please do.