code: def test_shuffler_with_limited_open_files(
      tmp_path, monkeypatch, caplog
  ):
      monkeypatch.setattr(shuffle, "MAX_MEM_BUFFER_SIZE", 0)
      shuffler = shuffle.Shuffler(
          tmp_path, "salt", disable_shuffling=False
      )
      # trigger Tensorflow imports before disabling opening files
      tf.io.gfile.GFile  # pylint: disable=pointless-statement
      tf.errors.ResourceExhaustedError  # pylint: disable=pointless-statement
  
      with disable_opening_files():
          shuffler.add(1, b"The")
  
      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"
              ),
          )
      ]
  
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 5 for calling a global function with example usage: test_shuffler_with_limited_open_files(tmp_path, monkeypatch, caplog) without return types