import six


def split_address(address):
    """Split an e-mail address into local part and domain."""
    assert isinstance(address, six.text_type),\
        "address should be of type %s" % six.text_type.__name__
    if "@" not in address:
        local_part = address
        domain = None
    else:
        local_part, domain = address.rsplit("@", 1)
    return (local_part, domain)