<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_unread_message_count_for(parser, token):
 """ Returns the unread message count for a user. Syntax:: {% get_unread_message_count_for [user] as [var_name] %} Example usage:: {% get_unread_message_count_for pero as message_count %} """

    try:
        tag_name, arg = token.contents.split(None, 1)
    except ValueError:
        raise template.TemplateSyntaxError("%s tag requires arguments" % token.contents.split()[0])
    m = re.search(r'(.*?) as (\w+)', arg)
    if not m:
        raise template.TemplateSyntaxError("%s tag had invalid arguments" % tag_name)
    user, var_name = m.groups()
    return MessageCount(user, var_name)