code: def encode_flag_val(val):
      if val is True:
          return "yes"
      if val is False:
          return "no"
      if val is None:
          return "null"
      if isinstance(val, list):
          return _encode_list(val)
      if isinstance(val, dict):
          return _encode_dict(val)
      return yaml_util.encode_yaml(val, default_flow_style=True)
  
imports: import logging
  import os
  import re
  import yaml
  from guild import util
  from guild import yaml_util
label_desc: Use image node_id 1 for calling a global function with example usage: encode_flag_val(val) and returns: yaml_util, str, str, str, _encode_list, _encode_dict