code: def test_method_ground_truth_computation(
      ground_truth_backend,
      on_device,
      org_con_data,
      args_np_method,
      met_arg_np_vals,
      met_args_idxs,
      kwargs_np_method,
      met_kwarg_np_vals,
      met_kwargs_idxs,
      method_input_dtypes,
      method_flags,
      class_name,
      method_name,
      test_trace,
      v_np,
  ):
      with BackendHandler.update_backend(
          ground_truth_backend
      ) as gt_backend:
          gt_backend.set_default_device(on_device)
          (
              args_gt_constructor,
              kwargs_gt_constructor,
          ) = create_args_kwargs(
              backend=ground_truth_backend, **org_con_data
          )
          args_gt_method, kwargs_gt_method = create_args_kwargs(
              backend=ground_truth_backend,
              args_np=args_np_method,
              arg_np_vals=met_arg_np_vals,
              args_idxs=met_args_idxs,
              kwargs_np=kwargs_np_method,
              kwarg_np_vals=met_kwarg_np_vals,
              kwargs_idxs=met_kwargs_idxs,
              input_dtypes=method_input_dtypes,
              test_flags=method_flags,
              on_device=on_device,
          )
          ins_gt = gt_backend.__dict__[class_name](
              *args_gt_constructor, **kwargs_gt_constructor
          )
          # TODO this when the handle_method can properly compute unsupported dtypes
          if any(
              dtype
              in gt_backend.function_unsupported_dtypes(
                  ins_gt.__getattribute__(method_name)
              )
              for dtype in method_input_dtypes
          ):
              return
          if isinstance(ins_gt, gt_backend.Module):
              v_gt = v_np.cont_map(
                  lambda x, kc: gt_backend.asarray(x)
                  if isinstance(x, np.ndarray)
                  else x
              )
              kwargs_gt_method = dict(**kwargs_gt_method, v=v_gt)
          (
              ret_from_gt,
              ret_np_from_gt_flat,
          ) = get_ret_and_flattened_np_array(
              ground_truth_backend,
              ins_gt.__getattribute__(method_name),
              *args_gt_method,
              test_trace=test_trace,
              precision_mode=method_flags.precision_mode,
              **kwargs_gt_method,
          )
          assert gt_backend.nested_map(
              lambda x: gt_backend.is_ivy_array(x)
              if gt_backend.is_array(x)
              else True,
              ret_from_gt,
          ), f"Ground-truth method returned non-ivy arrays: {ret_from_gt}"
  
          fw_list2 = gradient_unsupported_dtypes(
              fn=ins_gt.__getattribute__(method_name)
          )
          # for k, v in fw_list2.items():
          #     if k not in fw_list:
          #         fw_list[k] = []
          #     fw_list[k].extend(v)
  
          if isinstance(ret_from_gt, gt_backend.Array):
              ret_from_gt_device = gt_backend.dev(ret_from_gt)
          else:
              ret_from_gt_device = None
  
      return (
          ret_from_gt,
          ret_np_from_gt_flat,
          ret_from_gt_device,
          fw_list2,
      )
  
imports: import copy
  import time
  from typing import Union, List, Optional
  import numpy
  import types
  import importlib
  import inspect
  from collections import OrderedDict
  from .globals import mod_backend
  from .pipeline_helper import BackendHandler, BackendHandlerMode, get_frontend_config
  import ivy
  from ivy_tests.test_ivy.helpers.test_parameter_flags import FunctionTestFlags
  import ivy_tests.test_ivy.helpers.test_parameter_flags
  import ivy_tests.test_ivy.helpers.globals
  from ivy.functional.ivy.data_type import _get_function_list, _get_functions_from_string
  from ivy_tests.test_ivy.test_frontends import NativeClass
  from ivy_tests.test_ivy.helpers.structs import FrontendMethodData
  from ivy_tests.test_ivy.helpers.testing_helpers import _create_transpile_report
  from .assertions import value_test, assert_same_type, check_unsupported_dtype
label_desc: Use image node_id 14 for calling a global function with example usage: test_method_ground_truth_computation(ground_truth_backend, on_device, org_con_data, args_np_method, met_arg_np_vals, met_args_idxs, kwargs_np_method, met_kwarg_np_vals, met_kwargs_idxs, method_input_dtypes, method_flags, class_name, method_name, test_trace, v_np) and returns: ret_from_gt,  ret_np_from_gt_flat,  ret_from_gt_device,  fw_list2