code: func (ns *Namespace) resolveArgs(args []interface{}) (resource.Resource, map[string]interface{}, error) {
  	if len(args) == 0 {
  		return nil, nil, errors.New("no Resource provided in transformation")
  	}
  
  	if len(args) == 1 {
  		r, ok := args[0].(resource.Resource)
  		if !ok {
  			return nil, nil, fmt.Errorf("type %T not supported in Resource transformations", args[0])
  		}
  		return r, nil, nil
  	}
  
  	r, ok := args[1].(resource.Resource)
  	if !ok {
  		return nil, nil, fmt.Errorf("type %T not supported in Resource transformations", args[0])
  	}
  
  	m, err := cast.ToStringMapE(args[0])
  	if err != nil {
  		return nil, nil, _errors.Wrap(err, "invalid options type")
  	}
  
  	return r, m, nil
  }
docs: // This roundabout way of doing it is needed to get both pipeline behaviour and options as arguments.