<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def emoticons_tag(parser, token):
 """ Tag for rendering emoticons. """

    exclude = ''
    args = token.split_contents()
    if len(args) == 2:
        exclude = args[1]
    elif len(args) > 2:
        raise template.TemplateSyntaxError(
            'emoticons tag has only one optional argument')

    nodelist = parser.parse(['endemoticons'])
    parser.delete_first_token()
    return EmoticonNode(nodelist, exclude)