code: def test_memory_usage(self):
      cat = Categorical([1, 2, 3])
  
      # .categories is an index, so we include the hashtable
      assert 0 < cat.nbytes <= cat.memory_usage()
      assert 0 < cat.nbytes <= cat.memory_usage(deep=True)
  
      cat = Categorical(["foo", "foo", "bar"])
      assert cat.memory_usage(deep=True) > cat.nbytes
  
      if not PYPY:
          # sys.getsizeof will call the .memory_usage with
          # deep=True, and add on some GC overhead
          diff = cat.memory_usage(deep=True) - sys.getsizeof(cat)
          assert abs(diff) < 100
  
imports: import re
  import sys
  import numpy
  import pytest
  from pandas.compat import PYPY
  from pandas import Categorical, CategoricalDtype, DataFrame, Index, NaT, Series, date_range
  import pandas._testing
  from pandas.api.types import is_scalar
label_desc: Use image node_id 17 for calling the TestCategoricalAnalytics obj's underlying member method code with example usage: obj.test_memory_usage() without return types