docs: def _update_option_docstring(func, allowed, indent='    ' * 3):
      """
      Updates docstring of func, filling in appearance of {options} with a
      description of the options.
  
      >>> def f(): '''{options}'''
      >>> f = _update_option_docstring(f, ['title', 'xlim'])
      >>> print(f.__doc__)
      options (dict): Options for the plot. Available options:
      <BLANKLINE>
                  title: Title of the plot
                  xlim: Tuple containing (lower, upper) for x-axis
      <BLANKLINE>
      """
      if not (func.__doc__ and '{options}' in func.__doc__):
          return func
  
      descriptions = [option + ': ' + option_doc[option] for option in allowed]
      full_desc = ('\n' + indent).join(descriptions)
      func.__doc__ = func.__doc__.format(
          options=options_docstring.format(desc=full_desc)
      )
      return func