code: def test_print_report_max_depth(self):
      hook = memory_hooks.LineProfileHook(max_depth=1)
      with hook:
          p = self.pool.malloc(1000)
      del p
      f = io.StringIO()
      hook.print_report(file=f)
      actual = f.getvalue()
      assert 2 == len(actual.split("\n"))
  
      hook = memory_hooks.LineProfileHook(max_depth=2)
      with hook:
          p = self.pool.malloc(1000)
      del p
      f = io.StringIO()
      hook.print_report(file=f)
      actual = f.getvalue()
      assert 3 == len(actual.split("\n"))
  
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 3 for calling the TestLineProfileHook obj's underlying member method code with example usage: obj.test_print_report_max_depth() without return types