code: def test_no_initial_bytes(rgb_data_and_profile):
      """An empty MemoryFile can be opened and written into."""
      data, profile = rgb_data_and_profile
  
      with MemoryFile() as memfile:
          with memfile.open(**profile) as dst:
              dst.write(data)
          view = memfile.getbuffer()
          # Exact size of the in-memory GeoTIFF varies with GDAL
          # version and configuration.
          assert view.size > 1000000
          # NB: bytes(view) doesn't return what you'd expect with python 2.7.
          data = bytes(bytearray(view))
  
      with MemoryFile(data) as memfile:
          with memfile.open() as src:
              assert sorted(src.profile.items()) == sorted(
                  profile.items()
              )
  
imports: from io import BytesIO
  import os.path
  from pathlib import Path
  from affine import Affine
  import numpy
  import pytest
  import rasterio
  from rasterio.io import MemoryFile, ZipMemoryFile
  from rasterio.enums import MaskFlags
  from rasterio.shutil import copyfiles
label_desc: Use image node_id 18 for calling a global function with example usage: test_no_initial_bytes(rgb_data_and_profile) without return types