import ipaddress


def is_hsrp(ip_interface):
    """Verifies if an address is the 2nd or 3rd usable address in a network

    Args:
        ip_interface (str): A host interface is a way to describe, in a single compact form, both a host IP address and a network that it sits in

    Returns:
        bool: True if string is the 2nd or 3rd usable, else False

    Example:
        >>> from netutils.ip import is_hrsp
        >>> is_hsrp('10.0.0.2/24')
        True
        >>> is_hsrp('10.0.0.1/24')
        False
        >>> is_hsrp('10.0.0.4/24')
        False
    """

    int_ip = str(ipaddress.IPv4Interface(ip_interface).ip)
    hsrp = [str(ipaddress.IPv4Interface(ipaddress.IPv4Interface(ip_interface).network).ip+2),
            str(ipaddress.IPv4Interface(ipaddress.IPv4Interface(ip_interface).network).ip+3)]
    
    try:
        return int_ip in hsrp
    except ValueError:
        return False