code: def ema(
      df,
      periods=21,
      column=None,
      include=True,
      str="{name}({column},{period})",
      detail=False,
  ):
      def _ema(df, periods, column, include, str, detail=False):
          study = "EMA"
          df, _df, column = validate(df, column)
  
          ## === talib ====
          # _df['EMA']=pd.Series(talib.EMA(df[column].values,periods),index=df.index)
          ## === /talib ====
  
          ## === pure python ====
          _df["EMA"] = (
              df[column]
              .ewm(span=periods, min_periods=periods, adjust=False)
              .mean()
          )
          ## === /pure python ====
  
          return rename(
              df, _df, study, periods, column, include, str, detail
          )
  
      column = make_list(column)
      periods = make_list(periods)
      __df = pd.concat(
          [
              _ema(df, column=x, periods=y, include=False, str=str)
              for y in periods
              for x in column
          ],
          axis=1,
      )
      if include:
          return pd.concat([df, __df], axis=1)
      else:
          return __df
  
imports: import pandas
  import numpy
  from plotly.graph_objs import Figure
  from .utils import make_list
label_desc: Use image node_id 7 for calling a global function with example usage: ema(df, periods, column, include, str, detail) and returns: rename, pd, __df