code: func (d *Daemon) CheckRunningTaskNetworks(c *check.C) (interface{}, check.CommentInterface) {
  	cli := d.NewClientT(c)
  	defer cli.Close()
  
  	filterArgs := filters.NewArgs()
  	filterArgs.Add("desired-state", "running")
  
  	options := types.TaskListOptions{
  		Filters: filterArgs,
  	}
  
  	tasks, err := cli.TaskList(context.Background(), options)
  	assert.NilError(c, err)
  
  	result := make(map[string]int)
  	for _, task := range tasks {
  		for _, network := range task.Spec.Networks {
  			result[network.Target]++
  		}
  	}
  	return result, nil
  }
docs: // CheckRunningTaskNetworks returns the number of times each network is referenced from a task.