code: def ignite_average_to_scikit_average(average, data_type: str):
      if average in [None, "micro", "samples", "weighted", "macro"]:
          return average
      if average is False:
          if data_type == "binary":
              return "binary"
          else:
              return None
      elif average is True:
          return "macro"
      else:
          raise ValueError(f"Wrong average parameter `{average}`")
  
imports: import os
  import warnings
  import pytest
  import torch
  from sklearn.exceptions import UndefinedMetricWarning
  from sklearn.metrics import recall_score
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics import Recall
label_desc: Use image node_id 4 for calling a global function with example usage: ignite_average_to_scikit_average(average, data_type) and returns: average, str, None, str