code: def patch_h5py(monkeypatch):
      """Patches the 'h5py' module with a mock."""
      monkeypatch.setattr(hdf5, "h5py", MagicMock())
  
file_path: pennylane/tests/data/base/test_hdf5.py
imports: from unittest.mock import MagicMock
  import pytest
  from pennylane.data.base import hdf5
label_desc: Use image node_id 2 for calling a global function with example usage: patch_h5py(monkeypatch) without return types