input: Write a function to profile the performance of a given function using cProfile.
  assert isinstance(profile_function('target_function()'), str)
  assert 'function calls' in profile_function('target_function()')
  assert 'in profile_function' in profile_function('target_function()')
output: def profile_function(func_name):
      import cProfile
      import io
      import pstats
  
      pr = cProfile.Profile()
      pr.enable()
      exec(func_name)
      pr.disable()
  
      s = io.StringIO()
      sortby = 'cumulative'
      ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
      ps.print_stats()
      return s.getvalue()