code: func parseBot(c context.Context, swarmingHost string, botInfo *swarmingAPI.SwarmingRpcsBotInfo) (*model.Bot, error) {
  	lastSeen, err := time.Parse(swarming.SwarmingTimeLayout, botInfo.LastSeenTs)
  	if err != nil {
  		return nil, err
  	}
  	result := &model.Bot{
  		Name:     botInfo.BotId,
  		URL:      fmt.Sprintf("https://%s/bot?id=%s", swarmingHost, botInfo.BotId),
  		LastSeen: lastSeen,
  	}
  
  	switch {
  	case botInfo.TaskId != "" || botInfo.MaintenanceMsg != "":
  		result.Status = model.Busy
  	case botInfo.IsDead || botInfo.Quarantined:
  		result.Status = model.Offline
  	default:
  		// Defaults to idle.
  	}
  	return result, nil
  }
docs: // parseBot parses a Swarming BotInfo response into the structure we will
  // save into the datastore.  Since BotInfo doesn't have an explicit status
  // field that matches Milo's abstraction of a Bot, the status is inferred:
  // * A bot with TaskID is Busy
  // * A bot that is dead or quarantined is Offline
  // * Otherwise, it is implicitly connected and Idle.