<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_email():
 """ Validates that a fields value is a valid email address. """


    email = (
        ur'(?!^\.)'     # No dot at start
        ur'(?!.*\.@)'   # No dot before at sign
        ur'(?!.*@\.)'   # No dot after at sign
        ur'(?!.*\.$)'   # No dot at the end
        ur'(?!.*\.\.)'  # No double dots anywhere
        ur'^\S+'        # Starts with one or more non-whitespace characters
        ur'@'           # Contains an at sign
        ur'\S+$'        # Ends with one or more non-whitespace characters
    )

    regex = re.compile(email, re.IGNORECASE | re.UNICODE)

    def validate(value):
        if not regex.match(value):
            return e("{} is not a valid email address", value)
    return validate