code: def _onnx_crypten_softmax(g, input, dim, dtype=None):
      """
      This function converts PyTorch's Softmax module to a Softmax module in
      the ONNX model. It overrides PyTorch's default conversion of Softmax module
      to a sequence of Exp, ReduceSum and Div modules, since this default
      conversion can cause numerical overflow when applied to CrypTensors.
      """
      result = g.op("Softmax", input, axis_i=dim)
      if dtype and dtype.node().kind() != "prim::Constant":
          parsed_dtype = sym_help._get_const(dtype, "i", "dtype")
          result = g.op(
              "Cast",
              result,
              to_i=sym_help.scalar_type_to_onnx[parsed_dtype],
          )
      return result
  
imports: import copy
  import io
  import onnx
  import torch
  import torch.onnx.symbolic_helper
  import torch.onnx.utils
  from onnx import numpy_helper
  from torch.onnx import OperatorExportTypes
  from .None import module
label_desc: Use image node_id 13 for calling a global function with example usage: _onnx_crypten_softmax(g, input, dim, dtype) and returns: result