code: def get(
      key: str,
      default: Any = no_default,
      config: dict = config,
      override_with: Any = None,
  ) -> Any:
      """
      Get elements from global config
  
      If ``override_with`` is not None this value will be passed straight back.
      Useful for getting kwarg defaults from Dask config.
  
      Use '.' for nested access
  
      Examples
      --------
      >>> from dask import config
      >>> config.get('foo')  # doctest: +SKIP
      {'x': 1, 'y': 2}
  
      >>> config.get('foo.x')  # doctest: +SKIP
      1
  
      >>> config.get('foo.x.y', default=123)  # doctest: +SKIP
      123
  
      >>> config.get('foo.y', override_with=None)  # doctest: +SKIP
      2
  
      >>> config.get('foo.y', override_with=3)  # doctest: +SKIP
      3
  
      See Also
      --------
      dask.config.set
      """
      if override_with is not None:
          return override_with
      keys = key.split(".")
      result = config
      for k in keys:
          k = canonical_name(k, result)
          try:
              result = result[k]
          except (TypeError, IndexError, KeyError):
              if default is no_default:
                  raise
              return default
  
      return result
  
imports: from __future__ import annotations
  import ast
  import base64
  import builtins
  import json
  import os
  import site
  import sys
  import threading
  import warnings
  from collections.abc import Mapping, Sequence
  from typing import Any, Literal
  import yaml
  from dask.typing import no_default
label_desc: Use image node_id 11 for calling a global function with example usage: get(key, default, config, override_with) and returns: result, override_with, default