code: def test_memory_usage_execution(setup):
      dtypes = ["int64", "float64", "complex128", "object", "bool"]
      data = dict([(t, np.ones(shape=500).astype(t)) for t in dtypes])
      raw = pd.DataFrame(data)
  
      df = from_pandas_df(raw, chunk_size=(500, 2))
      r = df.memory_usage(index=False)
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.memory_usage(index=False)
      )
  
      df = from_pandas_df(raw, chunk_size=(500, 2))
      r = df.memory_usage(index=True)
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.memory_usage(index=True)
      )
  
      df = from_pandas_df(raw, chunk_size=(100, 3))
      r = df.memory_usage(index=False)
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.memory_usage(index=False)
      )
  
      r = df.memory_usage(index=True)
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.memory_usage(index=True)
      )
  
      raw = pd.DataFrame(data, index=np.arange(500).astype("object"))
  
      df = from_pandas_df(raw, chunk_size=(100, 3))
      r = df.memory_usage(index=True)
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.memory_usage(index=True)
      )
  
      raw = pd.Series(np.ones(shape=500).astype("object"), name="s")
  
      series = from_pandas_series(raw)
      r = series.memory_usage(index=True)
      assert r.execute().fetch() == raw.memory_usage(index=True)
  
      series = from_pandas_series(raw, chunk_size=100)
      r = series.memory_usage(index=False)
      assert r.execute().fetch() == raw.memory_usage(index=False)
  
      series = from_pandas_series(raw, chunk_size=100)
      r = series.memory_usage(index=True)
      assert r.execute().fetch() == raw.memory_usage(index=True)
  
      raw = pd.Series(
          np.ones(shape=500).astype("object"),
          index=np.arange(500).astype("object"),
          name="s",
      )
  
      series = from_pandas_series(raw, chunk_size=100)
      r = series.memory_usage(index=True)
      assert r.execute().fetch() == raw.memory_usage(index=True)
  
      raw = pd.Index(np.arange(500), name="s")
  
      index = from_pandas_index(raw)
      r = index.memory_usage()
      assert r.execute().fetch() == raw.memory_usage()
  
      index = from_pandas_index(raw, chunk_size=100)
      r = index.memory_usage()
      assert r.execute().fetch() == raw.memory_usage()
  
imports: import random
  from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  import mars
  from ....config import options, option_context
  from ....dataframe import DataFrame, Series
  from ....tensor import arange, tensor
  from ....tensor.random import rand
  from ....tests.core import require_cudf
  from ....utils import lazy_import, pd_release_version, no_default
  from ...None import eval, cut, qcut, get_dummies
  from ...core import DATAFRAME_OR_SERIES_TYPE
  from ...datasource.dataframe import from_pandas
  from ...datasource.series import from_pandas
  from ...datasource.index import from_pandas
  from ..None import to_gpu, to_cpu
  from ..bloom_filter import filter_by_bloom_filter
  from ..shift import _enable_no_default, _with_column_freq_bug
  from ..to_numeric import to_numeric
  from ..rebalance import DataFrameRebalance
label_desc: Use image node_id 32 for calling a global function with example usage: test_memory_usage_execution(setup) without return types