code: def _resolve_required_args_for_classification(**kwargs):
      """Resolves the required arguments for each issue type intended for classification tasks."""
      initial_args_dict = _CLASSIFICATION_ARGS_DICT.copy()
      args_dict = {
          issue_type: {
              arg: kwargs.get(arg, None)
              for arg in initial_args_dict[issue_type]
          }
          for issue_type in initial_args_dict
      }
  
      # Some issue types (like class-imbalance) have no required args.
      # This conditional lambda is used to include them in args dict.
      keep_empty_argument = lambda k: not len(
          _CLASSIFICATION_ARGS_DICT[k]
      )
  
      # Remove None values from argument list, rely on default values in IssueManager
      args_dict = {
          k: {k2: v2 for k2, v2 in v.items() if v2 is not None}
          for k, v in args_dict.items()
          if (v or keep_empty_argument(k))
      }
  
      # Prefer `knn_graph` over `features` if both are provided.
      for v in args_dict.values():
          if "cluster_ids" in v and (
              "knn_graph" in v or "features" in v
          ):
              warnings.warn(
                  "`cluster_ids` have been provided with `knn_graph` or `features`."
                  "Issue managers that require cluster labels will prefer"
                  "`cluster_ids` over computation of cluster labels using"
                  "`knn_graph` or `features`. "
              )
          if "knn_graph" in v and "features" in v:
              warnings.warn(
                  "Both `features` and `knn_graph` were provided. "
                  "Most issue managers will likely prefer using `knn_graph` "
                  "instead of `features` for efficiency."
              )
  
      # Only keep issue types that have at least one argument
      # or those that require no arguments.
      args_dict = {
          k: v
          for k, v in args_dict.items()
          if (v or keep_empty_argument(k))
      }
  
      return args_dict
  
file_path: cleanlab/cleanlab/datalab/internal/issue_finder.py
imports: from __future__ import annotations
  import warnings
  from typing import TYPE_CHECKING, Any, Dict, Optional
  import numpy
  from scipy.sparse import csr_matrix
  from cleanlab.datalab.internal.issue_manager_factory import _IssueManagerFactory, list_default_issue_types
  from cleanlab.datalab.internal.model_outputs import MultiClassPredProbs, RegressionPredictions
label_desc: Use image node_id 1 for calling a global function with example usage: _resolve_required_args_for_classification() and returns: args_dict