def METHOD_NAME(lines):
    multi_pattern = r"-+\s+Step\s+([0-9]+)\s+-+"
    # multi line thermo data
    if re.match(multi_pattern, lines[0]):
        timestep_marks = [idx for idx, line in enumerate(lines) if re.match(multi_pattern, line)]
        timesteps = np.split(lines, timestep_marks)[1:]
        dicts = []
        kv_pattern = r"([0-9A-Za-z_\[\]]+)\s+=\s+([0-9eE\.+-]+)"
        for ts in timesteps:
            data = {}
            data["Step"] = int(re.match(multi_pattern, ts[0]).group(1))
            data.update({k: float(v) for k, v in re.findall(kv_pattern, "".join(ts[1:]))})
            dicts.append(data)
        df = pd.DataFrame(dicts)
        # rearrange the sequence of columns
        columns = ["Step"] + [k for k, v in re.findall(kv_pattern, "".join(timesteps[0][1:]))]
        df = df[columns]
    # one line thermo data
    else:
        df = pd.read_csv(StringIO("".join(lines)), delim_whitespace=True)
    return df