def is_public_ip(ip: str):
    """
    Returns whether it is a public IP address

    :param str ip: String
    :return: bool
    """
    try:
        import IPy
        if 'PUBLIC' == IPy.IP(ip).iptype():
            return True
        return False
    except:
        return False
