code: async def update_module_firmware(request):
      
      log.debug('Update Firmware request received')
      data = await request.post()
      module_serial = request.match_info['serial']
  
      res = await _update_module_firmware(request.app['com.opentrons.hardware'],
                                          module_serial,
                                          data['module_firmware'],
                                          request.loop)
      if 'successful' not in res['message']:
          if 'avrdudeResponse' in res and \
             'checksum mismatch' in res['avrdudeResponse']:
              status = 400
          elif 'not found' in res['message']:
              status = 404
          else:
              status = 500
          log.error(res)
      else:
          status = 200
          log.info(res)
      return web.json_response(res, status=status)
docs: This handler accepts a POST request with Content-Type: multipart/form-data
       and a file field in the body named "module_firmware". The file should
       be a valid HEX image to be flashed to the atmega32u4. The received file is
       sent via USB to the board and flashed by the avr109 bootloader. The file
       is then deleted and a success code is returned