code: def list_devices():
      
      output = {}
      for device_id, device in devices.items():
          output[device_id] = {
              'host': device.host,
              'state': device.state
          }
      return jsonify(devices=output)
docs: List devices via HTTP GET.