code: def test_info_memory():
      # https://github.com/pandas-dev/pandas/issues/21056
      df = DataFrame({"a": Series([1, 2], dtype="i8")})
      buf = StringIO()
      df.info(buf=buf)
      result = buf.getvalue()
      bytes = float(df.memory_usage().sum())
      expected = textwrap.dedent(
          f"""\
      <class 'pandas.core.frame.DataFrame'>
      RangeIndex: 2 entries, 0 to 1
      Data columns (total 1 columns):
       #   Column  Non-Null Count  Dtype
      ---  ------  --------------  -----
       0   a       2 non-null      int64
      dtypes: int64(1)
      memory usage: {bytes} bytes
      """
      )
      assert result == expected
  
imports: from io import StringIO
  import re
  from string import ascii_uppercase
  import sys
  import textwrap
  import numpy
  import pytest
  from pandas.compat import IS64, PYPY
  from pandas import CategoricalIndex, DataFrame, MultiIndex, Series, date_range, option_context
  import pandas._testing
label_desc: Use image node_id 9 for calling a global function with example usage: test_info_memory() without return types