code: def _parse_config(pred_field, gt_field, method, **kwargs):
      if method is None:
          method = fo.evaluation_config.default_classification_backend
  
      if inspect.isclass(method):
          return method(pred_field, gt_field, **kwargs)
  
      backends = fo.evaluation_config.classification_backends
  
      if method not in backends:
          raise ValueError(
              "Unsupported classification evaluation method '%s'. The available "
              "methods are %s" % (method, sorted(backends.keys()))
          )
  
      params = deepcopy(backends[method])
  
      config_cls = kwargs.pop("config_cls", None)
  
      if config_cls is None:
          config_cls = params.pop("config_cls", None)
  
      if config_cls is None:
          raise ValueError(
              "Classification evaluation method '%s' has no `config_cls`"
              % method
          )
  
      if etau.is_str(config_cls):
          config_cls = etau.get_class(config_cls)
  
      params.update(**kwargs)
      return config_cls(pred_field, gt_field, **params)
  
imports: from copy import deepcopy
  import inspect
  import itertools
  import warnings
  import numpy
  import sklearn.metrics
  import eta.core.utils
  import fiftyone
  import fiftyone.core.evaluation
  from fiftyone.core.expressions import ViewField
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.plots
  import fiftyone.core.utils
  import fiftyone.core.validation
  from .base import BaseEvaluationResults
label_desc: Use image node_id 3 for calling a global function with example usage: _parse_config(pred_field, gt_field, method) and returns: config_cls, method