code: def test_read_overwrite(tmpdir):
      with fs.open(os.path.join(tmpdir, "randomBytes"), "wb") as f:
          f.write(secrets.token_bytes(2048))
  
      with fs.open(
          os.path.join(tmpdir, "randomBytes"), "rb", buffer_size=100
      ) as f:
          with hadoop_open(
              f"{tmpdir}/randomBytesOut", "wb", buffer_size=2**18
          ) as out:
              b = f.read()
              out.write(b)
  
      with hadoop_open(
          f"{tmpdir}/randomBytesOut", "rb", buffer_size=2**18
      ) as f:
          b2 = f.read()
  
      assert b == b2
  
imports: from typing import Generator
  import pytest
  import secrets
  import os
  import hail
  import hailtop.fs
  from hail.context import _get_local_tmpdir
  from hail.utils import hadoop_open, hadoop_copy, hadoop_ls
  from hailtop.utils import secret_alnum_string
  from hail.utils.java import FatalError
  from ..helpers import qobtest
label_desc: Use image node_id 6 for calling a global function with example usage: test_read_overwrite(tmpdir) without return types