code: def get_descriptor(dev, desc_size, desc_type, desc_index, wIndex = 0):
      r
      wValue = desc_index | (desc_type << 8)
  
      bmRequestType = util.build_request_type(
                          util.CTRL_IN,
                          util.CTRL_TYPE_STANDARD,
                          util.CTRL_RECIPIENT_DEVICE)
  
      return dev.ctrl_transfer(
              bmRequestType = bmRequestType,
              bRequest = 0x06,
              wValue = wValue,
              wIndex = wIndex,
              data_or_wLength = desc_size)
docs: r"""Return the specified descriptor.
  
      dev is the Device object to which the request will be
      sent to.
  
      desc_size is the descriptor size.
  
      desc_type and desc_index are the descriptor type and index,
      respectively. wIndex index is used for string descriptors
      and represents the Language ID. For other types of descriptors,
      it is zero.