code: func (engine *DockerStatsEngine) waitToStop() {
  	// Waiting for the event stream to close
  	ctx := engine.containerChangeEventStream.Context()
  	select {
  	case <-ctx.Done():
  		seelog.Debug("Event stream closed, stop listening to the event stream")
  		engine.containerChangeEventStream.Unsubscribe(containerChangeHandler)
  		engine.removeAll()
  	}
  }
docs: // waitToStop waits for the container change event stream close ans stop collection metrics