code: def parse_rst_params(doc):
      
      param_re = re.compile(r"""^([ \t]*):param\ 
                                (?P<param>\w+):\ 
                                (?P<body>.*\n(\1[ \t]+\w.*\n)*)""",
                            re.MULTILINE|re.VERBOSE)
      params = {}
      for match in param_re.finditer(doc):
          parts = match.groupdict()
          body_lines = parts['body'].strip().split('\n')
          params[parts['param']] = ' '.join(s.strip() for s in body_lines)
      
      return params
docs: Parse a reStructuredText docstring and return a dictionary
      with parameter names and descriptions. 
      
      >>> doc = '''
      ... :param foo: foo parameter
      ...     foo parameter
      ... 
      ...  :param bar: bar parameter
      ...  :param baz: baz parameter
      ...         baz parameter
      ...     baz parameter
      ...  Some text.
      ... '''
      >>> params = parse_rst_params(doc)
      >>> params['foo']
      'foo parameter foo parameter'
      >>> params['bar']
      'bar parameter'
      >>> params['baz']
      'baz parameter baz parameter baz parameter'