`args` with the type of `instance`.
if isinstance(instance, collections.OrderedDict):
return collections.OrderedDict(zip(six.iterkeys(instance), args))
elif isinstance(instance, dict):
return dict(zip(_sorted(instance), args))
elif (isinstance(instance, tuple) and
hasattr(instance, "_fields") and
After Change
// ordered and plain dicts (e.g., flattening a dict but using a
// corresponding `OrderedDict` to pack it back).
result = dict(zip(_sorted(instance), args))
return type(instance)((key, result[key]) for key in _six.iterkeys(instance))
elif (isinstance(instance, tuple) and
hasattr(instance, "_fields") and
isinstance(instance._fields, _collections.Sequence) and