code: def test_object_size():
      """Test object size estimation."""
      assert object_size(np.ones(10, np.float32)) < object_size(
          np.ones(10, np.float64)
      )
      for lower, upper, obj in (
          (0, 60, ""),
          (0, 30, 1),
          (0, 30, 1.0),
          (0, 70, "foo"),
          (0, 150, np.ones(0)),
          (0, 150, np.int32(1)),
          (150, 500, np.ones(20)),
          (30, 400, dict()),
          (400, 1000, dict(a=np.ones(50))),
          (200, 900, sparse.eye(20, format="csc")),
          (200, 900, sparse.eye(20, format="csr")),
      ):
          size = object_size(obj)
          assert lower < size < upper, "%s < %s < %s:\n%s" % (
              lower,
              size,
              upper,
              obj,
          )
      # views work properly
      x = dict(a=1)
      assert object_size(x) < 1000
      x["a"] = np.ones(100000, float)
      nb = x["a"].nbytes
      sz = object_size(x)
      assert nb < sz < nb * 1.01
      x["b"] = x["a"]
      sz = object_size(x)
      assert nb < sz < nb * 1.01
      x["b"] = x["a"].view()
      x["b"].flags.writeable = False
      assert x["a"].flags.writeable
      sz = object_size(x)
      assert nb < sz < nb * 1.01
  
imports: from copy import deepcopy
  from datetime import datetime, timezone
  from io import StringIO
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy import sparse
  from mne import pick_types, read_cov, read_evokeds
  from mne._fiff.pick import _picks_by_type
  from mne.epochs import make_fixed_length_epochs
  from mne.io import read_raw_fif
  from mne.time_frequency import tfr_morlet
  from mne.utils import _PCA, _apply_scaling_array, _apply_scaling_cov, _array_equal_nan, _cal_to_julian, _custom_lru_cache, _dt_to_julian, _freq_mask, _get_inst_data, _julian_to_cal, _julian_to_dt, _reg_pinv, _ReuseCycle, _time_mask, _undo_scaling_array, _undo_scaling_cov, compute_corr, create_slices, grand_average, hashfunc, numerics, object_diff, object_hash, object_size, random_permutation, sum_squared
  from mne.utils.numerics import _LRU_CACHE_MAXSIZES, _LRU_CACHES
label_desc: Use image node_id 11 for calling a global function with example usage: test_object_size() without return types