class_docstr: CustomOp registry.
class_docstr_tok: ["CustomOp","registry","."]
docstr: Get index for new entry.
docstr_tok: ["Get","index","for","new","entry","."]
code: def inc(self):
      """Get index for new entry."""
      self.lock.acquire()
      cur = self.counter
      self.counter += 1
      self.lock.release()
      return cur
  
imports: import traceback
  import warnings
  import collections
  from array import array
  from threading import Lock
  import ctypes
  from ctypes import CFUNCTYPE, POINTER, Structure, pointer
  from ctypes import c_void_p, c_int, c_char, c_char_p, cast, c_bool
  from .base import _LIB, check_call, MXCallbackList, c_array, c_array_buf, mx_int, OpHandle
  from .base import c_str, mx_uint, mx_float, ctypes2numpy_shared, NDArrayHandle, py_str
  from .None import symbol, context
  from .ndarray import NDArray, dtype_np_to_mx, dtype_mx_to_np
  from .ndarray.ndarray import _STORAGE_TYPE_STR_TO_ID, _STORAGE_TYPE_ID_TO_STR
  from .ndarray.ndarray import _STORAGE_TYPE_UNDEFINED, _STORAGE_TYPE_DEFAULT
  from .ndarray.ndarray import _STORAGE_TYPE_CSR, _STORAGE_TYPE_ROW_SPARSE
  from .ndarray import _ndarray_cls
  from .numpy.multiarray import _np_ndarray_cls
  from .util import is_np_array
label_desc: Use image node_id 2 for calling the _Registry obj's underlying member method code with example usage: obj.inc() and returns: cur