code: def log_sum_exp(a: float, b: float):
      if a == global_constants.FP32_NEG_INF:
          return b
  
      if b == global_constants.FP32_NEG_INF:
          return a
  
      if a > b:
          return math.log1p(math.exp(b - a)) + a
      else:
          return math.log1p(math.exp(a - b)) + b
  
file_path: NeMo/nemo/collections/asr/parts/numba/rnnt_loss/utils/rnnt_helper.py
imports: import math
  from typing import Optional, Tuple
  import numba
  import torch
  from numba import cuda
  from nemo.collections.asr.parts.numba.rnnt_loss.utils import global_constants
label_desc: Use image node_id 1 for calling a global function with example usage: log_sum_exp(a, b) and returns: b, a, unknown, unknown