code: def test_apply_diff_is_inplace():
      dest = MyDict()
      dest.attr = 42
      apply_diff({}, dest)
  
      assert type(dest) is MyDict, "Preserves class"
      assert dest.attr == 42, "Preserves custom attrs"
  
file_path: dvc/tests/unit/utils/test_collections.py
imports: import json
  import pytest
  from dvc.utils.collections import apply_diff, merge_dicts, remove_missing_keys, to_omegaconf
  from dvc.utils.serialize import dumps_yaml
label_desc: Use image node_id 1 for calling a global function with example usage: test_apply_diff_is_inplace() without return types