code: def celu(g: jit_utils.GraphContext, self, alpha):
      alpha = symbolic_helper._maybe_get_const(alpha, "f")
      # if the input is of type double cast it to float
      if (
          _type_utils.JitScalarType.from_value(
              self, _type_utils.JitScalarType.UNDEFINED
          )
          == _type_utils.JitScalarType.DOUBLE
      ):
          self = g.op(
              "Cast", self, to_i=_C_onnx.TensorProtoDataType.FLOAT
          )
          out = g.op("Celu", self, alpha_f=alpha)
          return g.op(
              "Cast", out, to_i=_C_onnx.TensorProtoDataType.DOUBLE
          )
  
      return g.op("Celu", self, alpha_f=alpha)
  
imports: from __future__ import annotations
  import functools
  import sys
  from typing import Optional, Tuple
  import torch
  from torch._C import _onnx
  from torch.onnx import _type_utils, errors, symbolic_helper, symbolic_opset9, utils
  from torch.onnx._internal import _beartype, jit_utils, registration
label_desc: Use image node_id 12 for calling a global function with example usage: celu(g, alpha) and returns: g, g