class_docstr: Docstring modification.
  
  Parameters
  ----------
  docstring : str
      The docstring to modify.
class_docstr_tok: ["Docstring","modification",".","Parameters","--","--","--","--","--","docstring",":","str","The","docstring","to","modify","."]
docstr: Parameters
  ----------
  block_name : str
      Name of the block to replace, e.g., 'Summary'.
  block : object
      The replacement block. The structure of the replacement block must
      match how the block is stored by NumpyDocString.
docstr_tok: ["Parameters","--","--","--","--","--","block_name",":","str","Name","of","the","block","to","replace",",","e.g.",",","'Summary","'",".","block",":","object","The","replacement","block",".","The","structure","of","the","replacement","block","must","match","how","the","block","is","stored","by","NumpyDocString","."]
code: def replace_block(self, block_name, block):
      """
      Parameters
      ----------
      block_name : str
          Name of the block to replace, e.g., 'Summary'.
      block : object
          The replacement block. The structure of the replacement block must
          match how the block is stored by NumpyDocString.
      """
      if self._docstring is None:
          # Protection against -oo execution
          return
      block_name = " ".join(map(str.capitalize, block_name.split(" ")))
      if block_name not in self._ds:
          raise ValueError(
              "{} is not a block in the " "docstring".format(block_name)
          )
      if not isinstance(block, list) and isinstance(
          self._ds[block_name], list
      ):
          block = [block]
      self._ds[block_name] = block
  
imports: from collections import namedtuple
  from collections.abc import Mapping
  import copy
  import inspect
  import re
  import textwrap
  from statsmodels.tools.sm_exceptions import ParseError
label_desc: Use image node_id 4 for calling the Docstring obj's underlying member method code with example usage: obj.replace_block(block_name, block) without return types