code: def _format_element(element, count, index, last_separator):
      
      return ("%s'%s'" % (last_separator, element)
              if count > 1 and index == count - 1
              else "'%s'" % (element,))
docs: Format an element from a sequence.
  
      This only prepends a separator for the last element and wraps each element
      with single quotes.