code: def _pack_named(conf):
      # Drop empty sections
      result = compact(conf)
  
      # Transform remote.name -> 'remote "name"'
      for key in ("remote", "machine", "db"):
          for name, val in conf[key].items():
              result[f'{key} "{name}"'] = val
          result.pop(key, None)
  
      return result
  
imports: import os
  import re
  from contextlib import contextmanager
  from functools import partial
  from typing import TYPE_CHECKING, Dict, Optional
  from funcy import compact, memoize, re_find
  from dvc.exceptions import DvcException, NotDvcRepoError
  from dvc.log import logger
  from .utils.objects import cached_property
label_desc: Use image node_id 4 for calling a global function with example usage: _pack_named(conf) and returns: result