code: def test_collect_yaml_permission_errors(tmpdir, kind):
      a = {"x": 1, "y": 2}
      b = {"y": 3, "z": 4}
  
      dir_path = str(tmpdir)
      a_path = os.path.join(dir_path, "a.yaml")
      b_path = os.path.join(dir_path, "b.yaml")
  
      with open(a_path, mode="w") as f:
          yaml.dump(a, f)
      with open(b_path, mode="w") as f:
          yaml.dump(b, f)
  
      if kind == "directory":
          cant_read = dir_path
          expected = {}
      else:
          cant_read = a_path
          expected = b
  
      with no_read_permissions(cant_read):
          config = merge(*collect_yaml(paths=[dir_path]))
          assert config == expected
  
imports: from __future__ import annotations
  import os
  import site
  import stat
  import sys
  from collections import OrderedDict
  from contextlib import contextmanager
  import pytest
  import yaml
  import dask.config
  from dask.config import _get_paths, canonical_name, collect, collect_env, collect_yaml, config, deserialize, ensure_file, expand_environment_variables, get, merge, pop, refresh, rename, serialize, update, update_defaults
  from dask.utils import tmpfile
label_desc: Use image node_id 11 for calling a global function with example usage: test_collect_yaml_permission_errors(tmpdir, kind) without return types