code: def test_strategy_as_ordered_dict(Sampler):
      """Check that it is possible to pass an `OrderedDict` as strategy."""
      rng = np.random.RandomState(42)
      X, y = rng.randn(30, 2), np.array([0] * 10 + [1] * 20)
      sampler = Sampler(random_state=42)
      if isinstance(sampler, RandomOverSampler):
          strategy = OrderedDict({0: 20, 1: 20})
      else:
          strategy = OrderedDict({0: 10, 1: 10})
      sampler.set_params(sampling_strategy=strategy)
      X_res, y_res = sampler.fit_resample(X, y)
      assert X_res.shape[0] == sum(strategy.values())
      assert y_res.shape[0] == sum(strategy.values())
  
imports: import warnings
  from collections import OrderedDict
  import numpy
  import pytest
  from sklearn.base import clone
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.utils._testing import SkipTest, ignore_warnings, set_random_state
  from sklearn.utils.estimator_checks import _construct_instance, _get_check_estimator_ids
  from sklearn.utils.estimator_checks import parametrize_with_checks
  from imblearn.over_sampling import RandomOverSampler
  from imblearn.under_sampling import NearMiss, RandomUnderSampler
  from imblearn.utils.estimator_checks import _set_checking_parameters, check_dataframe_column_names_consistency, check_param_validation, parametrize_with_checks
  from imblearn.utils.testing import all_estimators
label_desc: Use image node_id 6 for calling a global function with example usage: test_strategy_as_ordered_dict(Sampler) without return types