code: def FlagDictToArgs(flag_map):
    
    for key, value in six.iteritems(flag_map):
      if value is None:
        yield '--%s' % key
      elif isinstance(value, bool):
        if value:
          yield '--%s' % key
        else:
          yield '--no%s' % key
      elif isinstance(value, (bytes, type(u''))):
        # We don't want strings to be handled like python collections.
        yield '--%s=%s' % (key, value)
      else:
        # Now we attempt to deal with collections.
        try:
          yield '--%s=%s' % (key, ','.join(str(item) for item in value))
        except TypeError:
          # Default case.
          yield '--%s=%s' % (key, value)
docs: Convert a dict of values into process call parameters.
  
    This method is used to convert a dictionary into a sequence of parameters
    for a binary that parses arguments using this module.
  
    Args:
      flag_map: a mapping where the keys are flag names (strings).
        values are treated according to their type:
        * If value is None, then only the name is emitted.
        * If value is True, then only the name is emitted.
        * If value is False, then only the name prepended with 'no' is emitted.
        * If value is a string then --name=value is emitted.
        * If value is a collection, this will emit --name=value1,value2,value3.
        * Everything else is converted to string an passed as such.
    Yields:
      sequence of string suitable for a subprocess execution.