def nl_cb_alloc(kind):
if kind < <NUM_LIT:0> or kind > NL_CB_KIND_MAX:<EOL><INDENT>return None<EOL><DEDENT>cb = nl_cb()<EOL>cb.cb_active = NL_CB_TYPE_MAX + <NUM_LIT:1><EOL>for i in range(NL_CB_TYPE_MAX):<EOL><INDENT>nl_cb_set(cb, i, kind, None, None)<EOL><DEDENT>nl_cb_err(cb, kind, None, None)<EOL>return cb<EOL>
Allocate a new callback handle.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/handlers.c#L201

    Positional arguments:
    kind -- callback kind to be used for initialization.

    Returns:
    Newly allocated callback handle (nl_cb class instance) or None.