code: def test_check():
      ev = ExternalVersions()
      # should be all good
      ev.check("datalad")
      ev.check("datalad", min_version=__version__)
  
      with assert_raises(MissingExternalDependency):
          ev.check("dataladkukaracha")
      with assert_raises(MissingExternalDependency) as cme:
          ev.check("dataladkukaracha", min_version="buga", msg="duga")
  
      assert_in("duga", str(cme.value))
  
      with assert_raises(OutdatedExternalDependency):
          ev.check("datalad", min_version="10000000")
  
imports: import logging
  import pytest
  from os import linesep
  from datalad import __version__
  from datalad.cmd import StdOutErrCapture, WitlessRunner
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CommandError, MissingExternalDependency, OutdatedExternalDependency
  from datalad.tests.utils_pytest import SkipTest, assert_equal, assert_false, assert_greater, assert_greater_equal, assert_in, assert_not_in, assert_raises, assert_true, create_tree, patch, set_annex_version, swallow_logs, with_tempfile
  from ..external_versions import ExternalVersions, LooseVersion
label_desc: Use image node_id 17 for calling a global function with example usage: test_check() without return types