class_docstr: Class for custom operators in PyTorch.
  
  Use the CustomOp API to create user-defined custom operators that behave
  just like regular PyTorch operators (e.g. torch.sin, torch.mm) when it
  comes to various PyTorch subsystems (like torch.compile).
  
  To construct a `CustomOp`, use `custom_op`.
code: def _destroy(self):
      # NOTE: [CustomOp lifetime]
      # A CustomOp, once created, lives forever. The mechanism is that the
      # global registry holds a reference to it. However, to make testing
      # easier, we want to be able to destroy CustomOp objects.
      # CustomOp._destroy does the job, though it leaves the CustomOp
      # in a garbage state.
      del self._lib
  
      opnamespace = getattr(torch.ops, self._cpp_ns)
      if hasattr(opnamespace, self._opname):
          delattr(opnamespace, self._opname)
  
      del global_registry[self._qualname]
  
imports: import dataclasses
  import functools
  import inspect
  import sys
  import typing
  import weakref
  from torchgen.model import FunctionSchema, OperatorName, SchemaKind, BaseType, ListType, BaseTy
  import torch
  import torch._C
  import torch.library
  from torch._library.abstract_impl import AbstractImplCtx
  from torch.library import get_ctx
  from .autograd import autograd_kernel_indirection, construct_autograd_kernel
label_desc: Use image node_id 6 for calling the CustomOp obj's underlying member method code with example usage: obj._destroy() without return types