code: def _normalized_f1_score(model_f1, baseline_f1):
      """Normalize the model F1 score, given the baseline score."""
      # # F1 ranges from 0 to 1
      # # 1 is best
      # 0.5, 0.7 ==> 0 because model is worse than naive baseline
      # 0.75, 0.5 ==> 0.5
      #
      if model_f1 < baseline_f1:
          return 0
      else:
          scale_range = 1.0 - baseline_f1  # eg 0.3
          f1_diff = model_f1 - baseline_f1  # eg 0.1
          return f1_diff / scale_range
  
imports: import warnings
  import numpy
  import pandas
  from pandas.api.types import is_bool_dtype, is_categorical_dtype, is_datetime64_any_dtype, is_numeric_dtype, is_object_dtype, is_string_dtype, is_timedelta64_dtype
  from sklearn import preprocessing, tree
  from sklearn.metrics import f1_score, mean_absolute_error
  from sklearn.model_selection import cross_val_score
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 4 for calling a global function with example usage: _normalized_f1_score(model_f1, baseline_f1) and returns: int, unknown