def dump_attrs(ofd, attrs, attrlen, prefix=<NUM_LIT:0>):
prefix_whitespaces = '<STR_LIT:U+0020>' * prefix<EOL>rem = c_int()<EOL>for nla in nla_for_each_attr(attrs, attrlen, rem):<EOL><INDENT>alen = nla_len(nla)<EOL>if nla.nla_type == <NUM_LIT:0>:<EOL><INDENT>ofd('<STR_LIT>', prefix_whitespaces, alen)<EOL><DEDENT>else:<EOL><INDENT>is_nested = '<STR_LIT>' if nla_is_nested(nla) else '<STR_LIT>'<EOL>ofd('<STR_LIT>', prefix_whitespaces, nla.nla_type, is_nested, alen)<EOL><DEDENT>if nla_is_nested(nla):<EOL><INDENT>dump_attrs(ofd, nla_data(nla), alen, prefix + <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>dump_attr(ofd, nla, prefix)<EOL><DEDENT>padlen = nla_padlen(alen)<EOL>if padlen > <NUM_LIT:0>:<EOL><INDENT>ofd('<STR_LIT>', prefix_whitespaces, padlen)<EOL>dump_hex(ofd, bytearray_ptr(nla_data(nla), alen), padlen, prefix)<EOL><DEDENT><DEDENT>if rem.value:<EOL><INDENT>ofd('<STR_LIT>', prefix_whitespaces, rem)<EOL><DEDENT>
https://github.com/thom311/libnl/blob/libnl3_2_25/lib/msg.c#L869.

    Positional arguments:
    ofd -- function to call with arguments similar to `logging.debug`.
    attrs -- nlattr class instance.
    attrlen -- length of payload (integer).

    Keyword arguments:
    prefix -- additional number of whitespace pairs to prefix each log statement with.