code: def _last_impute_timeseries_dataframe(df):
      res_df = df.copy()
      res_df.iloc[0] = res_df.iloc[0].fillna(0)
      res_df = res_df.fillna(method="pad")
      return res_df
  
imports: import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: _last_impute_timeseries_dataframe(df) and returns: res_df