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`.
docstr: Register an implementation for a factory function.
docstr_tok: ["Register","an","implementation","for","a","factory","function","."]
code: def impl_factory(self) -> typing.Callable:
      r"""Register an implementation for a factory function."""
  
      def inner(f):
          self._register_impl("factory", f)
          library.impl(self._lib, self._opname, "BackendSelect")(f)
          return f
  
      return inner
  
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 11 for calling the CustomOp obj's underlying member method code with example usage: obj.impl_factory() and returns: inner, f