docstr: Decorator to mark a function or class as deprecated. Issue warning when the function is
  called or the class is instantiated, and add a warning to the docstring. The optional
  `details` argument will be appended to the deprecation message and the docstring
  
  Parameters
  ----------
  v_deprecate: String, default=None
      Version in which the decorated callable is considered deprecated. This will usually
      be the next version to be released when the decorator is added. If None, deprecation
      will be immediate, and the `v_remove` and `v_current` arguments are ignored
  v_remove: String, default=None
      Version in which the decorated callable will be removed. If None, the callable is not
      currently planned to be removed. Cannot be set if `v_deprecate` = None
  v_current: String, default=None
      Source of version information for currently running code. When `v_current` = None, the
      ability to determine whether the wrapped callable is actually in a period of deprecation
      or time for removal fails, raising a :class:`DeprecatedWarning` in all cases
  details: String, default=""
      Extra details added to callable docstring/warning, such as a suggested replacement
  
  Notes
  -----
  Thank you to the ingenious [Brian Curtin](https://github.com/briancurtin), author of the
  excellent [`deprecation` library](https://github.com/briancurtin/deprecation). He generously
  gave his permission to adapt his code for use here. Brian Curtin: his magnanimity is
  surpassed only by his intelligence and imitability
docstr_tok: ["Decorator","to","mark","a","function","or","class","as","deprecated",".","Issue","warning","when","the","function","is","called","or","the","class","is","instantiated",",","and","add","a","warning","to","the","docstring",".","The","optional","`","details","`","argument","will","be","appended","to","the","deprecation","message","and","the","docstring","Parameters","--","--","--","--","--","v_deprecate",":","String",",","default=None","Version","in","which","the","decorated","callable","is","considered","deprecated",".","This","will","usually","be","the","next","version","to","be","released","when","the","decorator","is","added",".","If","None",",","deprecation","will","be","immediate",",","and","the","`","v_remove","`","and","`","v_current","`","arguments","are","ignored","v_remove",":","String",",","default=None","Version","in","which","the","decorated","callable","will","be","removed",".","If","None",",","the","callable","is","not","currently","planned","to","be","removed",".","Can","not","be","set","if","`","v_deprecate","`","=","None","v_current",":","String",",","default=None","Source","of","version","information","for","currently","running","code",".","When","`","v_current","`","=","None",",","the","ability","to","determine","whether","the","wrapped","callable","is","actually","in","a","period","of","deprecation","or","time","for","removal","fails",",","raising","a",":","class",":","`","DeprecatedWarning","`","in","all","cases","details",":","String",",","default=","''","''","Extra","details","added","to","callable","docstring\/warning",",","such","as","a","suggested","replacement","Notes","--","--","-","Thank","you","to","the","ingenious","[","Brian","Curtin","]","(","https",":","\/\/github.com\/briancurtin",")",",","author","of","the","excellent","[","`","deprecation","`","library","]","(","https",":","\/\/github.com\/briancurtin\/deprecation",")",".","He","generously","gave","his","permission","to","adapt","his","code","for","use","here",".","Brian","Curtin",":","his","magnanimity","is","surpassed","only","by","his","intelligence","and","imitability"]
code: def __init__(
      self, v_deprecate=None, v_remove=None, v_current=None, details=""
  ):
      """Decorator to mark a function or class as deprecated. Issue warning when the function is
      called or the class is instantiated, and add a warning to the docstring. The optional
      `details` argument will be appended to the deprecation message and the docstring
  
      Parameters
      ----------
      v_deprecate: String, default=None
          Version in which the decorated callable is considered deprecated. This will usually
          be the next version to be released when the decorator is added. If None, deprecation
          will be immediate, and the `v_remove` and `v_current` arguments are ignored
      v_remove: String, default=None
          Version in which the decorated callable will be removed. If None, the callable is not
          currently planned to be removed. Cannot be set if `v_deprecate` = None
      v_current: String, default=None
          Source of version information for currently running code. When `v_current` = None, the
          ability to determine whether the wrapped callable is actually in a period of deprecation
          or time for removal fails, raising a :class:`DeprecatedWarning` in all cases
      details: String, default=""
          Extra details added to callable docstring/warning, such as a suggested replacement
  
      Notes
      -----
      Thank you to the ingenious [Brian Curtin](https://github.com/briancurtin), author of the
      excellent [`deprecation` library](https://github.com/briancurtin/deprecation). He generously
      gave his permission to adapt his code for use here. Brian Curtin: his magnanimity is
      surpassed only by his intelligence and imitability"""
      self.v_deprecate = v_deprecate
      self.v_remove = v_remove
      self.v_current = v_current
      self.details = details
  
      if self.v_deprecate is None and self.v_remove is not None:
          raise TypeError(
              "Cannot set `v_remove` without also setting `v_deprecate`"
          )
  
      #################### Determine Deprecation Status ####################
      self.is_deprecated = False
      self.is_unsupported = False
  
      if self.v_current:
          self.v_current = HHVersion(self.v_current)
  
          if self.v_remove and self.v_current >= HHVersion(
              self.v_remove
          ):
              self.is_unsupported = True
          elif self.v_deprecate and self.v_current >= HHVersion(
              self.v_deprecate
          ):
              self.is_deprecated = True
      else:
          self.is_deprecated = True
  
      self.do_warn = any([self.is_deprecated, self.is_unsupported])
      self.warning = None
  
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 1 to create a new Deprecated object from inherited base classes: object with example: obj = Deprecated(v_deprecate, v_remove, v_current, details)