code: def _compute_example_enumerated_subtypes(self, label):
          
          assert label in self._raw_examples, label
  
          example = self._raw_examples[label]
  
          example_field = list(example.fields.values())[0]
  
          for subtype_field in self.get_enumerated_subtypes():
              if subtype_field.name == example_field.name:
                  data_type = subtype_field.data_type
                  break
  
          ref = example_field.value
          if not data_type._has_example(ref.label):
              raise InvalidSpec(
                  "Reference to example for '%s' with label '%s' does not "
                  "exist." % (data_type.name, ref.label),
                  ref.lineno, ref.path)
  
          ordered_value = OrderedDict([('.tag', example_field.name)])
          flat_example = data_type._compute_example_flat_helper(ref.label)
          ordered_value.update(flat_example.value)
          flat_example.value = ordered_value
          return flat_example
docs: Analogous to :meth:`_compute_example_flat_helper` but for structs with
          enumerated subtypes.