code: def register_assert_rewrite(*names):
      """Register one or more module names to be rewritten on import.
  
      This function will make sure that this module or all modules inside
      the package will get their assert statements rewritten.
      Thus you should make sure to call this before the module is
      actually imported, usually in your __init__.py if you are a plugin
      using a package.
  
      :raise TypeError: if the given module names are not strings.
      """
      for name in names:
          if not isinstance(name, str):
              msg = "expected module names as *args, got {0} instead"
              raise TypeError(msg.format(repr(names)))
      for hook in sys.meta_path:
          if isinstance(hook, rewrite.AssertionRewritingHook):
              importhook = hook
              break
      else:
          importhook = DummyRewriteHook()
      importhook.mark_rewrite(*names)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import six
  from _pytest.assertion import rewrite
  from _pytest.assertion import truncate
  from _pytest.assertion import util
label_desc: Use image node_id 2 for calling a global function with example usage: register_assert_rewrite() without return types