def METHOD_NAME(self, prefix: str, asn: int) -> CymruIpOriginService:
    """!
    @brief Add new prefix -> asn mapping.
    @param prefix prefix.
    @param asn asn.
    @throws AssertionError if prefix invalid.
    @returns self, for chaining API calls.
    """
    [pfx, cidr] = prefix.split('/')
    cidr = int(cidr)
    assert cidr <= 24, 'Invalid prefix.'
    prefix = IPv4Network(prefix)
    sub_cidr = 24
    num_8s = 3
    if cidr >= 0:
        sub_cidr = 8
        num_8s = 1
    if cidr >= 9:
        sub_cidr = 16
        num_8s = 2
    if cidr >= 17:
        sub_cidr = 24
        num_8s = 3
    for net in prefix.subnets(new_prefix = sub_cidr):
        record = '*.'
        record += '.'.join(reversed(str(net).split('.')[0:3]))
        record += '.origin.asn TXT "{} | {} | ZZ | SEED | 0000-00-00"'.format(asn, net)
        self.__records.append(record)
    return self