code: def experiment_to_args(
      m: Experiment, base: Optional[List[str]] = None
  ) -> List[str]:
      """Returns the list of flag keys and values that corresponds to the supplied
      experiment.
  
      Keys all expand to the full '--key_name' style that typical Python flags are
      represented by.
  
      All values except for boolean values are inserted as str(v). For boolean
      values, if the value is True, the key is inserted by itself (in the format
      --key_name). If the value is False, the key isn't inserted at all.
  
      """
      if base is None:
          base = []
  
      ret = [] + base
  
      for k, v in m.items():
          opt = "--{}".format(k)
          if isinstance(v, bool):
              # Append a flag if the boolean flag is true, else do nothing.
              if v:
                  ret.append(opt)
          else:
              ret.append("--{}".format(k))
              ret.append(str(v))
  
      return ret
  
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import itertools
  import re
  import sys
  from collections import ChainMap
  from typing import Any, Dict, List, Optional, Tuple, Union
  import commentjson
  import caliban.util
  import caliban.util.argparse
  import caliban.util.schema
label_desc: Use image node_id 13 for calling a global function with example usage: experiment_to_args(m, base) and returns: ret