code: def test_new_errors(self, ensemble_spec, adanet_loss, variables=None):
      with self.test_session():
          with self.assertRaises(ValueError):
              _Candidate(ensemble_spec, adanet_loss, variables)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  from absl.testing import parameterized
  from adanet import tf_compat
  from adanet.core.candidate import _Candidate
  from adanet.core.candidate import _CandidateBuilder
  import adanet.core.testing_utils
  import tensorflow.compat.v2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling the CandidateTest obj's underlying member method code with example usage: obj.test_new_errors(ensemble_spec, adanet_loss, variables) without return types