code: def expand_args(items: Dict[str, str]) -> List[str]:
      """Converts the input map into a sequence of k, v pair strings. A None value is
      interpreted to mean that the key is a solo flag; it's evicted from the
      output.
  
      """
      pairs = [
          [k, v] if v is not None else [k] for k, v in items.items()
      ]
      return list(it.chain.from_iterable(pairs))
  
file_path: caliban/caliban/util/argparse.py
imports: import argparse
  import itertools
  import os
  from typing import Dict, List, Optional, Tuple
  from blessings import Terminal
  import caliban.util
  import caliban.util.fs
  import schema
label_desc: Use image node_id 1 for calling a global function with example usage: expand_args(items) and returns: list