code: def _get_method_supported_devices_dtypes_helper(
      method_name: str,
      class_module: str,
      class_name: str,
      backend_str: str,
  ):
      # helper to delegate backend related
      # computation outside the main function
      # so as to ease multiprocessing
      with BackendHandler.update_backend(backend_str) as backend:
          _fn = getattr(class_module.__dict__[class_name], method_name)
          devices_and_dtypes = (
              backend.function_supported_devices_and_dtypes(_fn)
          )
          organized_dtypes = {}
          for device in devices_and_dtypes.keys():
              organized_dtypes[device] = _partition_dtypes_into_kinds(
                  backend_str, devices_and_dtypes[device]
              )
      return organized_dtypes
  
imports: import json
  import os
  import pytest
  import importlib
  import inspect
  import functools
  from typing import List, Optional
  from hypothesis import given, strategies
  import ivy.functional.frontends.numpy
  from .hypothesis_helpers import number_helpers
  from .globals import TestData
  from .None import test_parameter_flags
  from .None import test_globals
  from .pipeline_helper import BackendHandler
  from ivy_tests.test_ivy.helpers.test_parameter_flags import DynamicFlag, BuiltInstanceStrategy, BuiltAsVariableStrategy, BuiltNativeArrayStrategy, BuiltGradientStrategy, BuiltContainerStrategy, BuiltWithOutStrategy, BuiltWithCopyStrategy, BuiltInplaceStrategy, BuiltTraceStrategy, BuiltFrontendArrayStrategy, BuiltTranspileStrategy, BuiltPrecisionModeStrategy, BuiltCythonWrapperStrategy
  from ivy_tests.test_ivy.helpers.structs import FrontendMethodData
  from ivy_tests.test_ivy.helpers.available_frameworks import available_frameworks
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.dtype_helpers import _dtype_kind_keys, _get_type_dict
  from .globals import mod_backend
label_desc: Use image node_id 6 for calling a global function with example usage: _get_method_supported_devices_dtypes_helper(method_name, class_module, class_name, backend_str) and returns: organized_dtypes