code: def test_fetch_megatrawls_netmats(tmp_path):
      # smoke test to see that files are fetched and read properly
      # since we are loading data present in it
      for file, folder in zip(
          ["Znet2.txt", "Znet1.txt"],
          [
              "3T_Q1-Q6related468_MSMsulc_d100_ts3",
              "3T_Q1-Q6related468_MSMsulc_d300_ts2",
          ],
      ):
          files_dir = tmp_path / "Megatrawls" / folder
          files_dir.mkdir(parents=True, exist_ok=True)
          with open(files_dir / file, "w") as net_file:
              net_file.write("1")
  
      megatrawl_netmats_data = func.fetch_megatrawls_netmats(
          data_dir=tmp_path
      )
  
      # expected number of returns in output name should be equal
      assert len(megatrawl_netmats_data) == 5
      # check if returned bunch should not be empty
      # dimensions
      assert megatrawl_netmats_data.dimensions != ""
      # timeseries
      assert megatrawl_netmats_data.timeseries != ""
      # matrices
      assert megatrawl_netmats_data.matrices != ""
      # correlation matrices
      assert megatrawl_netmats_data.correlation_matrices != ""
      # description
      assert megatrawl_netmats_data.description != ""
  
      # check if input provided for dimensions, timeseries, matrices to be same
      # to user settings
      netmats_data = func.fetch_megatrawls_netmats(
          data_dir=tmp_path,
          dimensionality=300,
          timeseries="multiple_spatial_regression",
          matrices="full_correlation",
      )
  
      assert netmats_data.dimensions == 300
      assert netmats_data.timeseries == "multiple_spatial_regression"
      assert netmats_data.matrices == "full_correlation"
  
imports: import json
  import os
  import re
  import shutil
  import tempfile
  import uuid
  from collections import OrderedDict
  from pathlib import Path
  import nibabel
  import numpy
  import pandas
  import pytest
  from nilearn.datasets import func
  from nilearn.datasets._utils import get_dataset_dir
  from nilearn.datasets.tests._testing import dict_to_archive, list_to_archive
  from nilearn.image import load_img
label_desc: Use image node_id 19 for calling a global function with example usage: test_fetch_megatrawls_netmats(tmp_path) without return types