def dump_hex(ofd, start, len_, prefix=<NUM_LIT:0>):
prefix_whitespaces = '<STR_LIT:U+0020>' * prefix<EOL>limit = <NUM_LIT:16> - (prefix * <NUM_LIT:2>)<EOL>start_ = start[:len_]<EOL>for line in (start_[i:i + limit] for i in range(<NUM_LIT:0>, len(start_), limit)):  <EOL><INDENT>hex_lines, ascii_lines = list(), list()<EOL>for c in line:<EOL><INDENT>hex_lines.append('<STR_LIT>'.format(c if hasattr(c, '<STR_LIT>') else ord(c)))<EOL>c2 = chr(c) if hasattr(c, '<STR_LIT>') else c<EOL>ascii_lines.append(c2 if c2 in string.printable[:<NUM_LIT>] else '<STR_LIT:.>')<EOL><DEDENT>hex_line = '<STR_LIT:U+0020>'.join(hex_lines).ljust(limit * <NUM_LIT:3>)<EOL>ascii_line = '<STR_LIT>'.join(ascii_lines)<EOL>ofd('<STR_LIT>', prefix_whitespaces, hex_line, ascii_line)<EOL><DEDENT>
Convert `start` to hex and logs it, 16 bytes per log statement.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/msg.c#L760

    Positional arguments:
    ofd -- function to call with arguments similar to `logging.debug`.
    start -- bytearray() or bytearray_ptr() instance.
    len_ -- size of `start` (integer).

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