code: def test_env():
      env = {
          "DASK_A_B": "123",
          "DASK_C": "True",
          "DASK_D": "hello",
          "DASK_E__X": "123",
          "DASK_E__Y": "456",
          "DASK_F": '[1, 2, "3"]',
          "DASK_G": "/not/parsable/as/literal",
          "FOO": "not included",
      }
  
      expected = {
          "a_b": 123,
          "c": True,
          "d": "hello",
          "e": {"x": 123, "y": 456},
          "f": [1, 2, "3"],
          "g": "/not/parsable/as/literal",
      }
  
      res = collect_env(env)
      assert res == expected
  
imports: from __future__ import annotations
  import os
  import site
  import stat
  import sys
  from collections import OrderedDict
  from contextlib import contextmanager
  import pytest
  import yaml
  import dask.config
  from dask.config import _get_paths, canonical_name, collect, collect_env, collect_yaml, config, deserialize, ensure_file, expand_environment_variables, get, merge, pop, refresh, rename, serialize, update, update_defaults
  from dask.utils import tmpfile
label_desc: Use image node_id 14 for calling a global function with example usage: test_env() without return types