code: def testInvalidSamples(self, samples):
      input_ph = tf1.placeholder_with_default(
          samples,
          shape=np.array(samples).shape if self.static_shape else None,
      )
      with self.assertRaises(Exception):
          dist = empirical.Empirical(
              samples=input_ph, event_ndims=2, validate_args=True
          )
          self.evaluate(dist.mean())
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import empirical
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the EmpiricalNdTest obj's underlying member method code with example usage: obj.testInvalidSamples(samples) without return types