<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parameters_str_to_dict(param_section):
 """ Convert a param section to a dict Parameters param_section : str Text in the parameter section Returns ------- d : OrderedDict Dictionary of the parameters in the order that they are described in the parameters section. The dict is of the form ``{param: all_parameter_text}``. You can reconstruct the ``param_section`` from the keys of the dictionary. See Also -------- :func:`parameters_dict_to_str` """

    d = OrderedDict()
    previous_param = None
    param_desc = None
    for line in param_section.split('\n'):
        param = param_spec(line)
        if param:
            if previous_param:
                d[previous_param] = '\n'.join(param_desc)
            param_desc = [line]
            previous_param = param
        elif param_desc:
            param_desc.append(line)

    if previous_param:
        d[previous_param] = '\n'.join(param_desc)

    return d