code: def test_index_errors():
      assert_raises(
          RuntimeError,
          general_index_error,
          b"",
          glob="no version signature found",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v0.1",
          glob="Unsupported version of the index file (v0.1).",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v1.1",
          glob="no sample count found",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v1.1 -1",
          glob="sample count must be positive",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v1.1 1\n",
          glob="no extensions provided for the sample",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v1.1 1\njpg",
          glob="Could not find all necessary component parameters",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v1.1 1\njpg 1 0",
          glob="tar offset is not a multiple of tar block size",
      )
      assert_raises(
          RuntimeError,
          general_index_error,
          b"v1.1 1\njpg 51200 1",
          "db/webdataset/sample-tar/empty.tar",
          glob="offset is outside of the archive file",
      )
  
file_path: DALI/dali/test/python/reader/test_webdataset_corner.py
imports: import math
  import nvidia.dali
  import os
  import tempfile
  from glob import glob
  from nose.tools import assert_equal
  import webdataset_base
  from nose_utils import assert_raises
  from test_utils import compare_pipelines, get_dali_extra_path
label_desc: Use image node_id 10 for calling a global function with example usage: test_index_errors() without return types