parameters: (
      doc, instructions, no_doc_str, suffix_str, notice)
return_statement: return '\n'.join(lines)
docstring: Adds a deprecation notice to a docstring.
  
    Args:
      doc: The original docstring.
      instructions: A string, describing how to fix the problem.
      no_doc_str: The default value to use for `doc` if `doc` is empty.
      suffix_str: Is added to the end of the first line.
      notice: A list of strings. The main notice warning body.
  
    Returns:
      A new docstring, with the notice attached.
  
    Raises:
      ValueError: If `notice` is empty.
docstring_summary: Adds a deprecation notice to a docstring.
docstring_tokens: Adds a deprecation notice to a docstring .
function: def add_notice_to_docstring(
      doc, instructions, no_doc_str, suffix_str, notice):
    """Adds a deprecation notice to a docstring.
  
    Args:
      doc: The original docstring.
      instructions: A string, describing how to fix the problem.
      no_doc_str: The default value to use for `doc` if `doc` is empty.
      suffix_str: Is added to the end of the first line.
      notice: A list of strings. The main notice warning body.
  
    Returns:
      A new docstring, with the notice attached.
  
    Raises:
      ValueError: If `notice` is empty.
    """
    if not doc:
      lines = [no_doc_str]
    else:
      lines = _normalize_docstring(doc).splitlines()
      lines[0] += ' ' + suffix_str
  
    if not notice:
      raise ValueError('The `notice` arg must not be empty.')
  
    notice[0] = 'Warning: ' + notice[0]
    notice = [''] + notice + ([instructions] if instructions else [])
  
    if len(lines) > 1:
      # Make sure that we keep our distance from the main body
      if lines[1].strip():
        notice.append('')
  
      lines[1:1] = notice
    else:
      lines += notice
  
    return '\n'.join(lines)
function_tokens: def add_notice_to_docstring ( doc , instructions , no_doc_str , suffix_str , notice ) : if not doc : lines = [ no_doc_str ] else : lines = _normalize_docstring ( doc ) . splitlines ( ) lines [ 0 ] += ' ' + suffix_str if not notice : raise ValueError ( 'The `notice` arg must not be empty.' ) notice [ 0 ] = 'Warning: ' + notice [ 0 ] notice = [ '' ] + notice + ( [ instructions ] if instructions else [ ] ) if len ( lines ) > 1 : # Make sure that we keep our distance from the main body if lines [ 1 ] . strip ( ) : notice . append ( '' ) lines [ 1 : 1 ] = notice else : lines += notice return '\n' . join ( lines )