code: def get_plot(lib, time):
      data = pypistats.overall(lib, total=True, format="pandas")
      data = (
          data.groupby("category")
          .get_group("with_mirrors")
          .sort_values("date")
      )
      start_date = date.today() - relativedelta(
          months=int(time.split(" ")[0])
      )
      data = data[(data["date"] > str(start_date))]
      data.date = pd.to_datetime(pd.to_datetime(data.date))
      return gr.LinePlot(
          value=data,
          x="date",
          y="downloads",
          tooltip=["date", "downloads"],
          title=f"Pypi downloads of {lib} over last {time}",
          overlay_point=True,
          height=400,
          width=900,
      )
  
imports: import gradio
  import pypistats
  from datetime import date
  from dateutil.relativedelta import relativedelta
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: get_plot(lib, time) and returns: gr