human
I wrote the below code

    def _append_inet_addr(intf_inet, addr):
        addr_list = intf_inet.split(',')
        if (addr in addr_list):
            LOG.debug('Interface    "%s"    has    already    "ifaddr":    %s', intf.ifname, addr)
            return intf_inet
        else:
            addr_list.append(addr)
            return ','.join(addr_list)
    intf = ip_link_show(session, ifname=ifname)
    if (not intf):
        LOG.debug('Interface    "%s"    does    not    exist', ifname)
        return None
    if ip.valid_ipv4(ifaddr):
        intf.inet = _append_inet_addr(intf.inet, ifaddr)
    elif ip.valid_ipv6(ifaddr):
        intf.inet6 = _append_inet_addr(intf.inet6, ifaddr)
    else:
        LOG.debug('Invalid    IP    address    for    "ifaddr":    %s', ifaddr)
        return None
    return intf

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

@base.sql_function
def ip_address_add(session, ifname, ifaddr):