code: def custom_op_from_existing(op):
      ns = op.namespace
      lib = torch.library.Library(ns, "FRAGMENT")
      name = op.name().split("::")[-1]
      schema_str = str(op._schema)
      # CustomOp expects the schema string without the namespace
      schema_str = schema_str.split("::")[-1]
      schema = FunctionSchema.parse(schema_str)
      return CustomOp(lib, ns, schema, name, op, _private_access=True)
  
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 15 for calling a global function with example usage: custom_op_from_existing(op) and returns: CustomOp