code: def test_raise_on_too_many_open_files(
      tmp_dir, dvc, tmp_path_factory, mocker, local_remote
  ):
      tmp_dir.dvc_gen({"file": "file content"})
  
      mocker.patch(
          "dvc_objects.fs.generic.transfer",
          side_effect=OSError(errno.EMFILE, "Too many open files"),
      )
  
      with pytest.raises(OSError, match="Too many open files") as e:
          dvc.push()
      assert e.value.errno == errno.EMFILE
  
imports: import errno
  import itertools
  import os
  import stat
  import configobj
  import pytest
  from dvc.cli import main
  from dvc.config import Config
  from dvc.exceptions import DownloadError, UploadError
  from dvc.utils.fs import remove
label_desc: Use image node_id 12 for calling a global function with example usage: test_raise_on_too_many_open_files(tmp_dir, dvc, tmp_path_factory, mocker, local_remote) without return types