code: def test_custom_bufferreaderwrapper(tmpdir):
      import copy
  
      with open(os.path.join(tmpdir.strpath, "test.txt"), "w") as f:
          f.write("some example text")
      with open(os.path.join(tmpdir.strpath, "test.txt"), "rb") as f:
          custom_fh = BufferedReaderWrapper(f)
          assert f.name == custom_fh.name
          assert f.mode == custom_fh.mode
          custom_fh_copy = copy.copy(custom_fh)
          assert custom_fh.name == custom_fh_copy.name
          assert custom_fh.mode == custom_fh_copy.mode
  
      assert f.closed
      assert not custom_fh.closed
      assert not custom_fh_copy.closed
  
      custom_fh_deepcopy = copy.deepcopy(custom_fh_copy)
      assert custom_fh_copy.name == custom_fh_deepcopy.name
      assert custom_fh_copy.mode == custom_fh_deepcopy.mode
      custom_fh_copy.close()
      assert custom_fh_copy.closed
      assert not custom_fh_deepcopy.closed
  
imports: from __future__ import division, print_function, unicode_literals, absolute_import
  import os
  import datetime
  import tempfile
  import io
  import pytest
  from tinydb import TinyDB
  from hashfs import HashFS
  from sacred.dependencies import get_digest
  from sacred.observers.tinydb_hashfs import TinyDbObserver, tiny_db_option
  from sacred.observers.tinydb_hashfs.bases import BufferedReaderWrapper
  from sacred import optional
  from sacred.experiment import Experiment
label_desc: Use image node_id 17 for calling a global function with example usage: test_custom_bufferreaderwrapper(tmpdir) without return types