class_docstr: These tests check that a ValueError is called
  for non-existent loss functions.
  They also check that suggestions are returned
  if the name is close to a real one.
class_docstr_tok: ["These","tests","check","that","a","ValueError","is","called","for","non-existent","loss","functions",".","They","also","check","that","suggestions","are","returned","if","the","name","is","close","to","a","real","one","."]
code: def test_value_error_for_bad_loss_function(self):
      with self.cached_session():
          with self.assertRaises(ValueError):
              LossFunction(1, loss_type="wrong answer")
  
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.loss_segmentation import LossFunction, labels_to_one_hot
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the LossFunctionErrorsTest obj's underlying member method code with example usage: obj.test_value_error_for_bad_loss_function() without return types