def METHOD_NAME(self, address: Union[str, tuple]):
    """
    Check that "address" is a string we can parse to an ip network,
    ready for saving as an ip range.
    """
    # return early if not a string we can parse
    if not isinstance(address, str):
        return
    # this looks an AS number return early
    if address.startswith("AS"):
        return
    try:
        network = ipaddress.ip_network(address)
    except ValueError:
        logger.exception(
            (
                f"Value for address: {address} has an invalid structure. "
                "Must be IPv4 or IPv6 with subnetmask (101.102.103.104/27) "
                "or AS number (AS123456)."
            )
        )
        return
    if network:
        return network