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 _check_doesnt_have_library_autograd_impl(self):
      if self._registered_autograd_kernel_indirection:
          return
  
      if _C._dispatch_has_kernel_for_dispatch_key(
          self._qualname, "CompositeImplicitAutograd"
      ):
          raise RuntimeError(
              f"impl_backward/impl_save_for_backward: the operator {self._qualname} "
              f"already has an implementation for this device type via a "
              f"pre-existing registration to DispatchKey::CompositeImplicitAutograd."
              f"CompositeImplicitAutograd operators do not need an autograd formula; "
              f"instead, the operator will decompose into its constituents and those "
              f"can have autograd formulas defined on them."
          )
  
      # We can improve this by adding "all Autograd<BACKEND> keys", but
      # realistically people will just be using this API for CPU/CUDA for now.
      for key in ["Autograd", "AutogradCPU", "AutogradCUDA"]:
          if _C._dispatch_has_kernel_for_dispatch_key(
              self._qualname, key
          ):
              raise RuntimeError(
                  f"impl_backward/impl_save_for_backward: "
                  f"the operator {self._qualname} already has an Autograd kernel "
                  f"registered to DispatchKey::{key} vi a pre-existing "
                  f"torch.library or TORCH_LIBRARY registration. Please either "
                  f"remove those registrations or don't use the torch._custom_ops APIs"
              )
  
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 14 for calling the CustomOp obj's underlying member method code with example usage: obj._check_doesnt_have_library_autograd_impl() without return types