def _SimplifiedValue(validator, value):
 if isinstance(value, ValidatedBase):
  return value.ToDict()
 elif isinstance(value, (list, tuple)):
  return [_SimplifiedValue(validator, item) for item in value]
 elif isinstance(validator, Validator):
  return validator.ToValue(value)
 return value

def _SimplifiedValue ( validator , value ) : if isinstance ( value , ValidatedBase ) : return value . ToDict ( ) elif isinstance ( value , ( list , tuple ) ) : return [ _SimplifiedValue ( validator , item ) for item in value ] elif isinstance ( validator , Validator ) : return validator . ToValue ( value ) return value
convert any value to simplified collections and basic types .