code: def _sampling_strategy_not_majority(y, sampling_type):
      """Returns sampling target by targeting all classes but not the
      majority."""
      target_stats = _count_class_sample(y)
      if sampling_type == "over-sampling":
          n_sample_majority = max(target_stats.values())
          class_majority = max(target_stats, key=target_stats.get)
          sampling_strategy = {
              key: n_sample_majority - value
              for (key, value) in target_stats.items()
              if key != class_majority
          }
      elif (
          sampling_type == "under-sampling"
          or sampling_type == "clean-sampling"
      ):
          n_sample_minority = min(target_stats.values())
          class_majority = max(target_stats, key=target_stats.get)
          sampling_strategy = {
              key: n_sample_minority
              for key in target_stats.keys()
              if key != class_majority
          }
      else:
          raise NotImplementedError
  
      return sampling_strategy
  
imports: import warnings
  from collections import OrderedDict
  from functools import wraps
  from inspect import Parameter, signature
  from numbers import Integral, Real
  import numpy
  from sklearn.base import clone
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils import check_array, column_or_1d
  from sklearn.utils.multiclass import type_of_target
  from sklearn.utils.validation import _num_samples
  from .fixes import _is_pandas_df
label_desc: Use image node_id 7 for calling a global function with example usage: _sampling_strategy_not_majority(y, sampling_type) and returns: sampling_strategy