code: func getLabelsByContainerID(containerID string, frameworks []frameworkInfo, log *logrus.Entry) map[string]string {
  	labels := map[string]string{}
  	for _, framework := range frameworks {
  		log.Debugf("Attempting to add labels to %v framework", framework)
  		for _, executor := range framework.Executors {
  			log.Debugf("Found executor %v for framework %v", framework, executor)
  			if executor.Container == containerID {
  				log.Debugf("ContainerID %v for executor %v is a match, adding labels", containerID, executor)
  				for _, pair := range executor.Labels {
  					if _, inSlice := cosmosLabels[pair.Key]; inSlice {
  						continue
  					}
  					if len(pair.Value) > maxLabelLength {
  						log.Warnf("Label %s is longer than %d chars; discarding label", pair.Key, maxLabelLength)
  						log.Debugf("Discarded label value: %s", pair.Value)
  						continue
  					}
  					log.Debugf("Adding label for containerID %v: %v = %+v", containerID, pair.Key, pair.Value)
  					labels[pair.Key] = pair.Value
  				}
  				return labels
  			}
  		}
  	}
  	return labels
  }
docs: // getLabelsByContainerID returns a map of labels, as specified by the framework
  // that created the executor. In the case of Marathon, the framework allows the
  // user to specify their own arbitrary labels per application.