<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _format_element(element, count, index, last_separator):
 """Format an element from a sequence. This only prepends a separator for the last element and wraps each element with single quotes. """

    return ("%s'%s'" % (last_separator, element)
            if count > 1 and index == count - 1
            else "'%s'" % (element,))