code: def test_increase_open_files_limit(caplog):
      with disable_opening_files():
          with pytest.raises(OSError) as exc_info:
              tempfile.TemporaryFile()
          assert exc_info.value.strerror == "Too many open files"
  
          shuffle._increase_open_files_limit()
          assert caplog.record_tuples == [
              (
                  "absl",
                  logging.WARNING,
                  (
                      "Soft limit for the maximum number of open file descriptors for the"
                      " current process increased from 1 to 1001"
                  ),
              )
          ]
          tempfile.TemporaryFile()
  
      _, hard_limit = resource.getrlimit(resource.RLIMIT_NOFILE)
      resource.setrlimit(
          resource.RLIMIT_NOFILE, (hard_limit, hard_limit)
      )
      caplog.clear()
      shuffle._increase_open_files_limit()
      assert caplog.record_tuples == [
          (
              "absl",
              logging.ERROR,
              (
                  "Soft and hard limits for the maximum number of open file descriptors"
                  " for the current process are identical."
              ),
          )
      ]
  
imports: import collections
  import contextlib
  import logging
  import resource
  import tempfile
  from absl.testing.absltest import mock
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import shuffle
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: test_increase_open_files_limit(caplog) without return types