code: def test_l1_loss(self):
      # expected loss: mean(.2 + 2) = 1.1
      with self.cached_session():
          predicted = tf.constant(
              [1.2, 1], dtype=tf.float32, name="predicted"
          )
          gold_standard = tf.constant(
              [1, 3], dtype=tf.float32, name="gold_standard"
          )
          self.assertAlmostEqual(
              l1_loss(predicted, gold_standard).eval(), 1.1
          )
  
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.loss_regression import LossFunction
  from niftynet.layer.loss_regression import l1_loss, l2_loss, huber_loss, smooth_l1_loss, cosine_loss
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 3 for calling the L1LossTests obj's underlying member method code with example usage: obj.test_l1_loss() without return types