code: def prim_unchecked_cast(g: jit_utils.GraphContext, self):
      # exists to refine the type of the Value
      # if x is Optional[Tensor], unchecked_cast will cast
      # x to Tensor, so the rest of the graph knows that x is a Tensor.
      if isinstance(self.type(), _C.OptionalType):
          return g.op("OptionalGetElement", self)
  
      return self
  
file_path: pytorch/torch/onnx/symbolic_opset15.py
imports: import functools
  import torch
  from torch import _C
  from torch.onnx import symbolic_helper, symbolic_opset9
  from torch.onnx._internal import _beartype, jit_utils, registration
label_desc: Use image node_id 4 for calling a global function with example usage: prim_unchecked_cast(g, ) and returns: self, g