code: def test_name_generation():
      assert_equal(get_api_name(("some.module", "SomeClass")), "module")
      assert_equal(
          get_api_name(
              ("some.module", "SomeClass", "cmdline-override")
          ),
          "module",
      )
      assert_equal(
          get_api_name(
              (
                  "some.module",
                  "SomeClass",
                  "cmdline_override",
                  "api_override-dont-touch",
              )
          ),
          "api_override-dont-touch",
      )
  
file_path: datalad/datalad/tests/test_interface.py
imports: import re
  from datalad.interface.base import Interface, get_api_name
  from datalad.support import constraints
  from datalad.support.param import Parameter
  from datalad.tests.utils_pytest import assert_equal, assert_in, assert_is, assert_raises, assert_re_in, assert_true, swallow_outputs
label_desc: Use image node_id 3 for calling a global function with example usage: test_name_generation() without return types