docstr: Create a docstring containing the old docstring, in addition to a deprecation warning
  
  Parameters
  ----------
  old_doc: String
      Original docstring for the callable being deprecated, to which a warning will be added
  
  Returns
  -------
  String
      A new docstring with both the original docstring and a deprecation warning
docstr_tok: ["Create","a","docstring","containing","the","old","docstring",",","in","addition","to","a","deprecation","warning","Parameters","--","--","--","--","--","old_doc",":","String","Original","docstring","for","the","callable","being","deprecated",",","to","which","a","warning","will","be","added","Returns","--","--","--","-","String","A","new","docstring","with","both","the","original","docstring","and","a","deprecation","warning"]
code: def _update_doc(self, old_doc):
      """Create a docstring containing the old docstring, in addition to a deprecation warning
  
      Parameters
      ----------
      old_doc: String
          Original docstring for the callable being deprecated, to which a warning will be added
  
      Returns
      -------
      String
          A new docstring with both the original docstring and a deprecation warning
      """
      if not self.do_warn:
          return old_doc
  
      old_doc = old_doc or ""
  
      parts = dict(
          v_deprecate=" {}".format(self.v_deprecate)
          if self.v_deprecate
          else "",
          v_remove="\n\tWill be removed in {}.".format(self.v_remove)
          if self.v_remove
          else "",
          details=" {}".format(self.details) if self.details else "",
      )
  
      deprecation_note = (
          ".. deprecated::{v_deprecate}{v_remove}{details}".format(
              **parts
          )
      )
      loc = 1
      string_list = old_doc.split("\n", 1)
  
      if len(string_list) > 1:
          string_list[1] = dedent(string_list[1])
          string_list.insert(loc, "\n")
  
          if MESSAGE_LOCATION != "top":
              loc = 3
  
      string_list.insert(loc, deprecation_note)
      string_list.insert(loc, "\n\n")
  
      return "".join(string_list)
  
imports: from hyperparameter_hunter.i_o.exceptions import DeprecatedWarning, UnsupportedWarning
  from functools import wraps
  import re
  from six import string_types
  from textwrap import dedent
  from typing import Union
  from warnings import warn, simplefilter
label_desc: Use image node_id 5 for calling the Deprecated obj's underlying member method code with example usage: obj._update_doc(old_doc) and returns: str, old_doc