code: def test_extra_conn_args_connection_args():
      c = {
          "distributed.comm.tls.ca-file": ca_file,
          "distributed.comm.tls.scheduler.key": key1,
          "distributed.comm.tls.scheduler.cert": cert1,
          "distributed.comm.tls.worker.cert": keycert1,
      }
      with dask.config.set(c):
          sec = Security(
              extra_conn_args={
                  "headers": {"Authorization": "Token abcd"}
              }
          )
  
      d = sec.get_connection_args("scheduler")
      assert not d["require_encryption"]
      assert d["extra_conn_args"]["headers"] == {
          "Authorization": "Token abcd"
      }
      ctx = d["ssl_context"]
  
      d = sec.get_connection_args("worker")
      assert d["extra_conn_args"]["headers"] == {
          "Authorization": "Token abcd"
      }
  
      # No cert defined => no TLS
      d = sec.get_connection_args("client")
      assert d.get("ssl_context") is None
      assert d["extra_conn_args"]["headers"] == {
          "Authorization": "Token abcd"
      }
  
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 15 for calling a global function with example usage: test_extra_conn_args_connection_args() without return types