code: def test_tls_config_for_role():
      c = {
          "distributed.comm.tls.ca-file": "ca.pem",
          "distributed.comm.tls.scheduler.key": "skey.pem",
          "distributed.comm.tls.scheduler.cert": "scert.pem",
          "distributed.comm.tls.worker.cert": "wcert.pem",
          "distributed.comm.tls.ciphers": FORCED_CIPHER,
      }
      with dask.config.set(c):
          sec = Security()
      t = sec.get_tls_config_for_role("scheduler")
      assert t == {
          "ca_file": "ca.pem",
          "key": "skey.pem",
          "cert": "scert.pem",
          "ciphers": FORCED_CIPHER,
      }
      t = sec.get_tls_config_for_role("worker")
      assert t == {
          "ca_file": "ca.pem",
          "key": None,
          "cert": "wcert.pem",
          "ciphers": FORCED_CIPHER,
      }
      t = sec.get_tls_config_for_role("client")
      assert t == {
          "ca_file": "ca.pem",
          "key": None,
          "cert": None,
          "ciphers": FORCED_CIPHER,
      }
      with pytest.raises(ValueError):
          sec.get_tls_config_for_role("supervisor")
  
imports: from __future__ import annotations
  import ssl
  from contextlib import contextmanager
  import pytest
  import dask
  from distributed.comm import connect, listen
  from distributed.security import Security
  from distributed.utils_test import gen_test, get_cert, xfail_ssl_issue5601
label_desc: Use image node_id 12 for calling a global function with example usage: test_tls_config_for_role() without return types