code: def wait_mock_fixture(_futures, return_when=None):
      """Patch to avoid raising exceptions after collecting threads."""
      return MagicMock(done=[])
  
imports: import os
  from pathlib import Path, PosixPath
  from unittest.mock import MagicMock, patch
  import pytest
  import requests
  import pennylane
  import pennylane.data.data_manager
  from pennylane.data import Dataset
  from pennylane.data.data_manager import S3_URL, DataPath, _validate_attributes
label_desc: Use image node_id 6 for calling a global function with example usage: wait_mock_fixture(_futures, return_when) and returns: MagicMock