def validate_ip_address(ip_addr: str) -> str:
    """Validate Ip address and return the type of IP address.

    Args:
        IP (string): ip address to validate

    Returns:
        string: type of IP address, IPv4 or IPv6
    """
    try:
        return "IPv4" if type(ip_address(ip_addr)) is IPv4Address else "IPv6"
    except ValueError:
        return "Invalid"
Validate Ip address and return the type of IP address.

    Args:
        IP (string): ip address to validate

    Returns:
        string: type of IP address, IPv4 or IPv6
    
Solutions/Dataminr Pulse/Data Connectors/DataminrPulseAlerts/DataminrPulseThreatIntelligence/dataminr_pulse_to_threat_intelligence_mapping.py