code: def test_print_report(self):
      hook = memory_hooks.LineProfileHook()
      p = self.pool.malloc(1000)
      del p
      with hook:
          p1 = self.pool.malloc(1000)
          p2 = self.pool.malloc(2000)
      del p1
      del p2
      f = io.StringIO()
      hook.print_report(file=f)
      actual = f.getvalue()
      expect = r"\A_root \(3\.00KB, 2\.00KB\)"
      assert re.search(expect, actual)
      expect = r".*\.py:[0-9]+:test_print_report \(1\.00KB, 0\.00B\)"
      assert re.search(expect, actual)
      expect = r".*\.py:[0-9]+:test_print_report \(2\.00KB, 2\.00KB\)"
      assert re.search(expect, actual)
  
file_path: cupy/tests/cupy_tests/cuda_tests/memory_hooks_tests/test_line_profile.py
imports: import io
  import unittest
  import re
  from cupy.cuda import memory
  from cupy.cuda import memory_hooks
label_desc: Use image node_id 2 for calling the TestLineProfileHook obj's underlying member method code with example usage: obj.test_print_report() without return types