code: def test_saving_picked(tmp_path, comp_grade):
      """Test saving picked CTF instances."""
      temp_dir = str(tmp_path)
      out_fname = op.join(temp_dir, "test_py_raw.fif")
      raw = read_raw_ctf(op.join(ctf_dir, ctf_fname_1_trial))
      assert raw.info["meas_date"] == _stamp_to_dt((1367228160, 0))
      raw.crop(0, 1).load_data()
      assert raw.compensation_grade == get_current_comp(raw.info) == 0
      assert len(raw.info["comps"]) == 5
      picks = _picks_to_idx(raw.info, "meg", with_ref_meg=False)
  
      raw.apply_gradient_compensation(comp_grade)
      with catch_logging() as log:
          raw_pick = raw.copy().pick(picks, verbose=True)
      assert len(raw.info["comps"]) == 5
      assert len(raw_pick.info["comps"]) == 0
      log = log.getvalue()
      assert "Removing 5 compensators" in log
      raw_pick.save(out_fname, overwrite=True)  # should work
      raw2 = read_raw_fif(out_fname)
      assert raw_pick.ch_names == raw2.ch_names
      assert_array_equal(raw_pick.times, raw2.times)
      assert_allclose(
          raw2[0:20][0], raw_pick[0:20][0], rtol=1e-6, atol=1e-20
      )  # atol is very small but > 0
  
      raw2 = read_raw_fif(out_fname, preload=True)
      assert raw_pick.ch_names == raw2.ch_names
      assert_array_equal(raw_pick.times, raw2.times)
      assert_allclose(
          raw2[0:20][0], raw_pick[0:20][0], rtol=1e-6, atol=1e-20
      )
  
imports: import copy
  import os
  import shutil
  from datetime import datetime, timezone
  from os import path
  import numpy
  import pytest
  from numpy import array_equal
  from numpy.testing import assert_allclose, assert_array_equal
  import mne
  import mne.io.ctf.info
  from mne import create_info, events_from_annotations, make_forward_solution, pick_types, read_annotations
  from mne._fiff.compensator import get_current_comp
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import _picks_to_idx
  from mne.datasets import brainstorm, spm_face, testing
  from mne.io import RawArray, read_raw_ctf, read_raw_fif
  from mne.io.ctf.constants import CTF
  from mne.io.ctf.info import _convert_time
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.tests.test_annotations import _assert_annotations_equal
  from mne.transforms import apply_trans
  from mne.utils import _clean_names, _record_warnings, _stamp_to_dt, catch_logging
label_desc: Use image node_id 4 for calling a global function with example usage: test_saving_picked(tmp_path, comp_grade) without return types