code: func (m *Method) inheritFromTraits(r *Resource, is []DefinitionChoice, traitsMap map[string]Trait,
  	apiDef *APIDefinition) error {
  	for _, tDef := range is {
  		// acquire traits object
  		t, ok := traitsMap[tDef.Name]
  		if !ok {
  			return fmt.Errorf("invalid traits name:%v", tDef.Name)
  		}
  
  		if err := m.inheritFromATrait(r, &t, tDef.Parameters, apiDef); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // inherit from all traits, inherited traits are:
  // - resource level trait
  // - method trait