code: def get_loop_factory() -> (
      Callable[[], asyncio.AbstractEventLoop] | None
  ):
      event_loop = dask.config.get("distributed.admin.event-loop")
      if event_loop == "uvloop":
          uvloop = import_required(
              "uvloop",
              "The distributed.admin.event-loop configuration value "
              "is set to 'uvloop' but the uvloop module is not installed"
              "\n\n"
              "Please either change the config value or install one of the following\n"
              "    conda install uvloop\n"
              "    pip install uvloop",
          )
          return uvloop.new_event_loop
      if event_loop in {"asyncio", "tornado"}:
          if sys.platform == "win32":
              # ProactorEventLoop is not compatible with tornado 6
              # fallback to the pre-3.8 default of Selector
              # https://github.com/tornadoweb/tornado/issues/2608
              return asyncio.SelectorEventLoop
          return None
      raise ValueError(
          "Expected distributed.admin.event-loop to be in ('asyncio', 'tornado', 'uvloop'), got %s"
          % dask.config.get("distributed.admin.event-loop")
      )
  
file_path: distributed/distributed/config.py
imports: from __future__ import annotations
  import asyncio
  import logging.config
  import os
  import sys
  from collections.abc import Callable
  from typing import Any
  import yaml
  import dask
  from dask.utils import import_required
label_desc: Use image node_id 6 for calling a global function with example usage: get_loop_factory() and returns: uvloop, None, asyncio