code: def test_min_dependencies_readme():
      # Test that the minimum dependencies in the README.rst file are
      # consistent with the minimum dependencies defined at the file:
      # imblearn/_min_dependencies.py
  
      pattern = re.compile(
          r"(\.\. \|)"
          + r"(([A-Za-z]+\-?)+)"
          + r"(MinVersion\| replace::)"
          + r"( [0-9]+\.[0-9]+(\.[0-9]+)?)"
      )
  
      readme_path = Path(imblearn.__path__[0]).parents[0]
      readme_file = readme_path / "README.rst"
  
      if not os.path.exists(readme_file):
          # Skip the test if the README.rst file is not available.
          # For instance, when installing scikit-learn from wheels
          pytest.skip("The README.rst file is not available.")
  
      with readme_file.open("r") as f:
          for line in f:
              matched = pattern.match(line)
  
              if not matched:
                  continue
  
              package, version = matched.group(2), matched.group(5)
              package = package.lower()
  
              if package in dependent_packages:
                  version = parse_version(version)
                  min_version = parse_version(
                      dependent_packages[package][0]
                  )
  
                  assert (
                      version == min_version
                  ), f"{package} has a mismatched version"
  
file_path: imbalanced-learn/imblearn/utils/tests/test_min_dependencies.py
imports: import os
  import platform
  import re
  from pathlib import Path
  import pytest
  from sklearn.utils.fixes import parse_version
  import imblearn
  from imblearn._min_dependencies import dependent_packages
label_desc: Use image node_id 1 for calling a global function with example usage: test_min_dependencies_readme() without return types