code: def _check_chainerx_numpy_result(
      check_result_func, chainerx_result, numpy_result
  ):
      # Catch _ResultsCheckFailure and generate a comprehensible error message.
      try:
          _check_chainerx_numpy_result_impl(
              check_result_func,
              chainerx_result,
              numpy_result,
              indices=(),
          )
      except _ResultsCheckFailure as e:
          indices = e.indices
          chx_r = chainerx_result
          np_r = numpy_result
          i = 0
          while indices[i:]:
              chx_r = chx_r[indices[i]]
              np_r = np_r[indices[i]]
              i += 1
  
          def make_message(e):
              indices_str = "".join("[{}]".format(i) for i in indices)
              s = "{}: {}\n\n".format(
                  e.msg, e.condense_results(np_r, chx_r)
              )
              if indices:
                  s += "chainerx results{}: {}\n".format(
                      indices_str, type(chx_r)
                  )
                  s += "{}\n\n".format(chx_r)
                  s += "numpy results{}: {}\n".format(
                      indices_str, type(np_r)
                  )
                  s += "{}\n\n".format(np_r)
              s += "chainerx results: {}\n".format(
                  type(chainerx_result)
              )
              s += "{}\n\n".format(chainerx_result)
              s += "numpy results: {}\n".format(type(numpy_result))
              s += "{}\n\n".format(numpy_result)
              return s
  
          raise AssertionError(make_message(e))
  
imports: import functools
  import traceback
  import warnings
  import numpy
  import pytest
  import chainerx
  from chainerx.testing import array
label_desc: Use image node_id 7 for calling a global function with example usage: _check_chainerx_numpy_result(check_result_func, chainerx_result, numpy_result) and returns: s