code: def make_regression_absolute_difference_loss_fn():
      """Returns the Mean Average Error loss_fn for regression."""
  
      def _loss_fn(labels, logits, weights=1.0):
          return tf.compat.v1.losses.absolute_difference(
              labels=labels,
              predictions=logits,
              weights=weights,
              reduction=tf.compat.v1.losses.Reduction.SUM_OVER_BATCH_SIZE,
          )
  
      return _loss_fn
  
imports: import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling a global function with example usage: make_regression_absolute_difference_loss_fn() and returns: _loss_fn, tf