code: def test_external_versions_rogue_module(topd=None):
      ev = ExternalVersions()
      # if module throws some other non-ImportError exception upon import
      # we must not crash, but issue a warning
      modname = "verycustomrogue__"
      create_tree(
          topd, {modname + ".py": 'raise Exception("pickaboo")'}
      )
      with patch("sys.path", [topd]), swallow_logs(
          new_level=logging.WARNING
      ) as cml:
          assert ev[modname] is None
          assert_true(ev.dumps(indent=True).endswith(linesep))
          assert_in("pickaboo", cml.out)
  
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 7 for calling a global function with example usage: test_external_versions_rogue_module(topd) without return types