code: def test_squeeze_throw_error():
      args_list = [
          ([1], None, None, [(300, 1, 200), (10, 10, 10)]),
          (None, "C", "XYZ", [(2, 3, 4), (4, 2, 3)]),
          (None, "Z", "XYZ", [(1, 1, 10)]),
          ([2], "Z", "XYZ", [[1, 1, 10]]),
          ([2, 1], None, "XYZ", [(100, 0, 0)]),
          ([1, 1], None, "XYZ", [(300, 1, 200), (10, 1, 10)]),
      ]
      expected_errors = [
          "Requested a shape with 100 elements but the original shape has 1000 elements.",
          "Axis 'C' is not present in the input layout",
          "Requested a shape with 1 elements but the original shape has 10 elements.",
          "Provided both ``axes`` and ``axis_names`` arguments",
          "Requested a shape with 100 elements but the original shape has 0 elements.",
          "Specified at least twice same dimension to remove.",
      ]
      assert len(expected_errors) == len(args_list)
      for (axes, axis_names, layout, shapes), error_msg in zip(
          args_list, expected_errors
      ):
          yield raises(RuntimeError, error_msg)(
              _test_squeeze_throw_error
          ), axes, axis_names, layout, shapes
  
file_path: DALI/dali/test/python/operator_2/test_squeeze.py
imports: import numpy
  import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  from nose_utils import raises
label_desc: Use image node_id 6 for calling a global function with example usage: test_squeeze_throw_error() without return types