code: def test__add_dep_doc():
      # Test utility function to add deprecation message to docstring
      npt.assert_equal(_add_dep_doc("", "foo"), "foo\n")
      npt.assert_equal(_add_dep_doc("bar", "foo"), "bar\n\nfoo\n")
      npt.assert_equal(_add_dep_doc("   bar", "foo"), "   bar\n\nfoo\n")
      npt.assert_equal(
          _add_dep_doc("   bar", "foo\n"), "   bar\n\nfoo\n"
      )
      npt.assert_equal(_add_dep_doc("bar\n\n", "foo"), "bar\n\nfoo\n")
      npt.assert_equal(
          _add_dep_doc("bar\n    \n", "foo"), "bar\n\nfoo\n"
      )
      npt.assert_equal(
          _add_dep_doc(" bar\n\nSome explanation", "foo\nbaz"),
          " bar\n\nfoo\nbaz\n\nSome explanation\n",
      )
      npt.assert_equal(
          _add_dep_doc(" bar\n\n  Some explanation", "foo\nbaz"),
          " bar\n  \n  foo\n  baz\n  \n  Some explanation\n",
      )
  
file_path: dipy/dipy/utils/tests/test_deprecator.py
imports: import sys
  import warnings
  import numpy.testing
  import pytest
  import dipy
  from dipy.testing import clear_and_catch_warnings, assert_true
  from dipy.utils.deprecator import cmp_pkg_version, _add_dep_doc, _ensure_cr, deprecate_with_version, deprecated_params, ArgsDeprecationWarning, ExpiredDeprecationError
label_desc: Use image node_id 3 for calling a global function with example usage: test__add_dep_doc() without return types