code: def stringify_values(data):
      
      if not isinstance(data, dict):
          raise ValueError('Data must be dict. %r is passed' % data)
  
      values_dict = {}
      for key, value in data.items():
          items = []
          if isinstance(value, six.string_types):
              items.append(value)
          elif isinstance(value, Iterable):
              for v in value:
                  # Convert to str int values
                  if isinstance(v, int):
                      v = str(v)
                  try:
                      item = six.u(v)
                  except TypeError:
                      item = v
                  items.append(item)
              value = ','.join(items)
          values_dict[key] = value
      return values_dict
docs: Coerce iterable values to 'val1,val2,valN'
  
      Example:
          fields=['nickname', 'city', 'can_see_all_posts']
          --> fields='nickname,city,can_see_all_posts'
  
      :param data: dict
      :return: converted values dict