code: def smooth_l1_loss(bbox_prediction, bbox_target, sigma=3.0):
      """
      Return Smooth L1 Loss for bounding box prediction.
  
      Args:
          bbox_prediction: shape (1, H, W, num_anchors * 4)
          bbox_target:     shape (1, H, W, num_anchors * 4)
  
  
      Smooth L1 loss is defined as:
  
      0.5 * x^2                  if |x| < d
      abs(x) - 0.5               if |x| >= d
  
      Where d = 1 and x = prediction - target
  
      """
      sigma2 = sigma**2
      diff = bbox_prediction - bbox_target
      abs_diff = tf.abs(diff)
      abs_diff_lt_sigma2 = tf.less(abs_diff, 1.0 / sigma2)
      bbox_loss = tf.reduce_sum(
          tf.where(
              abs_diff_lt_sigma2,
              0.5 * sigma2 * tf.square(abs_diff),
              abs_diff - 0.5 / sigma2,
          ),
          [1],
      )
      return bbox_loss
  
label_desc: Use image node_id 1 for calling a global function with example usage: smooth_l1_loss(bbox_prediction, bbox_target, sigma) and returns: bbox_loss