def split_local_part(local_part, delimiter=None):
    """Split a local part into local part and extension."""
    assert isinstance(local_part, str), 'local_part should be of type str'
    assert isinstance(delimiter, str
        ) or delimiter is None, 'delimiter should be of type str'
    extension = None
    if local_part.lower() in ['mailer-daemon', 'double-bounce']:
        pass
    elif delimiter == '-' and (local_part.startswith('owner-') or
        local_part.endswith('-request')):
        pass
    elif delimiter and delimiter in local_part and local_part[0
        ] != delimiter and local_part[-1] != delimiter:
        local_part, extension = local_part.split(delimiter, 1)
    return local_part, extension
