code: def _preprocess(df):
      """
      given a DataFrame where records are stored row-wise, rearrange it
      such that records are stored column-wise.
      """
  
      df = df.stack()
  
      df.index.rename(["id", "time"], inplace=True)  # .reset_index()
      df.name = "value"
      df = df.reset_index()
  
      return df
  
imports: import argparse
  import os
  import sys
  import pandas
  from tsfresh import extract_features
label_desc: Use image node_id 1 for calling a global function with example usage: _preprocess(df) and returns: df