code: def test_capture_bound_method(self):
      code = """
  def capture_bound_method(fname, r):
      if r:
          f = open(fname,'w')
          write_line = f.write
      else:
          write_line = fake_write
      for i in range(10):
          write_line(str(i))
      if r:
          f.close()
  
  def fake_write(s):
      return 0"""
      self.run_test(
          code, "none", False, capture_bound_method=[str, bool]
      )
  
imports: import pythran
  from pythran.tests import TestEnv
  import numpy
  from tempfile import mkstemp
  import unittest
  from pythran.typing import List, Set, Dict, NDArray
label_desc: Use image node_id 25 for calling the TestNormalizeMethods obj's underlying member method code with example usage: obj.test_capture_bound_method() without return types