code: func (o *LabelOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
  	var err error
  
  	o.RecordFlags.Complete(cmd)
  	o.Recorder, err = o.RecordFlags.ToRecorder()
  	if err != nil {
  		return err
  	}
  
  	o.outputFormat = cmdutil.GetFlagString(cmd, "output")
  	o.dryrun = cmdutil.GetDryRunFlag(cmd)
  
  	o.ToPrinter = func(operation string) (printers.ResourcePrinter, error) {
  		o.PrintFlags.NamePrintFlags.Operation = operation
  		if o.dryrun {
  			o.PrintFlags.Complete("%s (dry run)")
  		}
  
  		return o.PrintFlags.ToPrinter()
  	}
  
  	resources, labelArgs, err := cmdutil.GetResourcesAndPairs(args, "label")
  	if err != nil {
  		return err
  	}
  	o.resources = resources
  	o.newLabels, o.removeLabels, err = parseLabels(labelArgs)
  
  	if o.list && len(o.outputFormat) > 0 {
  		return fmt.Errorf("--list and --output may not be specified together")
  	}
  
  	o.namespace, o.enforceNamespace, err = f.ToRawKubeConfigLoader().Namespace()
  	if err != nil {
  		return err
  	}
  	o.builder = f.NewBuilder()
  	o.unstructuredClientForMapping = f.UnstructuredClientForMapping
  
  	return nil
  }
docs: // Complete adapts from the command line args and factory to the data required.