code: def test_memory_usage_components_narrow_series(any_real_numpy_dtype):
      series = Series(
          range(5),
          dtype=any_real_numpy_dtype,
          index=[f"i-{i}" for i in range(5)],
          name="a",
      )
      total_usage = series.memory_usage(index=True)
      non_index_usage = series.memory_usage(index=False)
      index_usage = series.index.memory_usage()
      assert total_usage == non_index_usage + index_usage
  
file_path: pandas/pandas/tests/base/test_misc.py
imports: import sys
  import numpy
  import pytest
  from pandas._config import using_pyarrow_string_dtype
  from pandas.compat import PYPY
  from pandas.core.dtypes.common import is_dtype_equal, is_object_dtype
  import pandas
  from pandas import Index, Series
label_desc: Use image node_id 6 for calling a global function with example usage: test_memory_usage_components_narrow_series(any_real_numpy_dtype) without return types