code: def test_balanced_batch_generator(data, sampler):
      if LooseVersion(tf.__version__) < "2":
          check_balanced_batch_generator_tf_1_X_X(data, sampler)
      else:
          check_balanced_batch_generator_tf_2_X_X_compat_1_X_X(
              data, sampler
          )
  
file_path: imbalanced-learn/imblearn/tensorflow/tests/test_generator.py
imports: from distutils.version import LooseVersion
  import numpy
  import pytest
  from scipy import sparse
  from sklearn.datasets import load_iris
  from imblearn.datasets import make_imbalance
  from imblearn.over_sampling import RandomOverSampler
  from imblearn.tensorflow import balanced_batch_generator
  from imblearn.under_sampling import NearMiss
label_desc: Use image node_id 4 for calling a global function with example usage: test_balanced_batch_generator(data, sampler) without return types