code: def test_deprecations_on_yaml(tmp_path, key):
      d = {}
      with open(tmp_path / "dask.yaml", "w") as fh:
          yaml.dump({key: 123}, fh)
  
      with pytest.warns(FutureWarning) as info:
          dask.config.refresh(config=d, paths=[tmp_path])
      assert "distributed.scheduler.allowed-failures" in str(
          info[0].message
      )
      assert (
          dask.config.get(
              "distributed.scheduler.allowed-failures", config=d
          )
          == 123
      )
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import os
  import re
  import subprocess
  import sys
  import tempfile
  import textwrap
  import pytest
  import yaml
  import dask.config
  from distributed.config import initialize_logging
  from distributed.utils_test import captured_handler, new_config, new_config_file
label_desc: Use image node_id 14 for calling a global function with example usage: test_deprecations_on_yaml(tmp_path, key) without return types