code: def _add_validator(fv, validator_instance):
    
    for flag_name in validator_instance.get_flags_names():
      fv[flag_name].validators.append(validator_instance)
docs: Register new flags validator to be checked.
  
    Args:
      fv: flags.FlagValues, the FlagValues instance to add the validator.
      validator_instance: validators.Validator, the validator to add.
    Raises:
      KeyError: Raised when validators work with a non-existing flag.