code: def trending_up(df: pd.Series, period: int) -> pd.Series:
      """returns boolean Series if the inputs Series is trending up over last n periods.
      :param df: data
      :param period: range
      :return: result Series
      """
  
      return pd.Series(
          df.diff(period) > 0, name="trending_up {}".format(period)
      )
  
imports: import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: trending_up(df, period) and returns: pd