code: async def update_module(
              self, module: modules.AbstractModule,
              firmware_file: str,
              loop: asyncio.AbstractEventLoop = None) -> Tuple[bool, str]:
          
          details = (module.port, module.name())
          mod = self._attached_modules.pop(details[0] + details[1])
          try:
              new_mod = await self._backend.update_module(
                  mod, firmware_file, loop)
          except modules.UpdateError as e:
              return False, e.msg
          else:
              new_details = new_mod.port + new_mod.device_info['model']
              self._attached_modules[new_details] = new_mod
              return True, 'firmware update successful'
docs: Update a module's firmware.
  
          Returns (ok, message) where ok is True if the update succeeded and
          message is a human readable message.