def limit_labels_for_label_normalizer(
    label_normalizer,
    acceptable_labels):
  """Limits keys and values in label_normalizer to acceptable labels."""
  limited_label_normalizer = {}
  for k, v in label_normalizer.items():
    if k in acceptable_labels:
      limited_label_normalizer[k] = sorted(
          acceptable_labels.intersection(set(v)))

  return limited_label_normalizer