code: func (dc *DefinitionChoice) UnmarshalYAML(unmarshaler func(interface{}) error) error {
  
  	simpleDefinition := new(string)
  	parameterizedDefinition := make(map[string]DefinitionParameters)
  
  	var err error
  
  	// Unmarshal into a string
  	if err = unmarshaler(simpleDefinition); err == nil {
  		dc.Name = *simpleDefinition
  		dc.Parameters = nil
  	} else if err = unmarshaler(parameterizedDefinition); err == nil {
  		// Didn't work? Now unmarshal into a map
  		for choice, params := range parameterizedDefinition {
  			dc.Name = choice
  			dc.Parameters = params
  		}
  	}
  
  	// Still didn't work? Panic
  
  	return err
  }
docs: // UnmarshalYAML unmarshals a node which MIGHT be a simple string or a
  // map[string]DefinitionParameters