code: def _add_docstring(format_dict):
      
      def add_docstring_context(func):
          def wrapper(*args, **kwargs):
              return func(*args, **kwargs)
          wrapper.__doc__ = func.__doc__.format(**format_dict)
          return wrapper
      return add_docstring_context
docs: Format a doc-string on the fly.
      @arg format_dict: A dictionary to format the doc-strings
      Example:
  
          @add_docstring({'context': __doc_string_context})
          def predict(x):
              '''
              {context}
              >> model.predict(data)
              '''
              return x