code: def nl_cb_alloc(kind):
      
      if kind < 0 or kind > NL_CB_KIND_MAX:
          return None
      cb = nl_cb()
      cb.cb_active = NL_CB_TYPE_MAX + 1
      for i in range(NL_CB_TYPE_MAX):
          nl_cb_set(cb, i, kind, None, None)
      nl_cb_err(cb, kind, None, None)
      return cb
docs: 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.