<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_public(addr):
 # type: (Union[str, unicode]) -> bool """ Check if the passed email registered at a free pubic mail server :param addr: email address to check :return: bool False True """

    addr_domain = domain(addr)
    if not addr_domain:
        # anybody can use invalid email
        return True
    chunks = addr_domain.rsplit(".", 1)

    return len(chunks) < 2 \
        or addr_domain.endswith("local") \
        or addr_domain in public_domains()