code: def _sampling_strategy_majority(y, sampling_type):
      """Returns sampling target by targeting the majority class only."""
      if sampling_type == "over-sampling":
          raise ValueError(
              "'sampling_strategy'='majority' cannot be used with over-sampler."
          )
      elif (
          sampling_type == "under-sampling"
          or sampling_type == "clean-sampling"
      ):
          target_stats = _count_class_sample(y)
          class_majority = max(target_stats, key=target_stats.get)
          n_sample_minority = min(target_stats.values())
          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 Real
  from typing import Any, Dict
  import numpy
  from sklearn.utils import column_or_1d
  from sklearn.utils.multiclass import type_of_target
label_desc: Use image node_id 3 for calling a global function with example usage: _sampling_strategy_majority(y, sampling_type) and returns: sampling_strategy