code: def get_configuration(dev):
      r
      bmRequestType = util.build_request_type(
                              util.CTRL_IN,
                              util.CTRL_TYPE_STANDARD,
                              util.CTRL_RECIPIENT_DEVICE)
  
      return dev.ctrl_transfer(
                  bmRequestType,
                  bRequest = 0x08,
                  data_or_wLength = 1)[0]
docs: r"""Get the current active configuration of the device.
  
      dev is the Device object to which the request will be
      sent to.
  
      This function differs from the Device.get_active_configuration
      method because the later may use cached data, while this
      function always does a device request.