code: def get_plot(period=1):
      global plot_end
      x = np.arange(plot_end - 2 * math.pi, plot_end, 0.02)
      y = np.sin(2 * math.pi * period * x)
      update = gr.LinePlot(
          value=pd.DataFrame({"x": x, "y": y}),
          x="x",
          y="y",
          title="Plot (updates every second)",
          width=600,
          height=350,
      )
      plot_end += 2 * math.pi
      if plot_end > 1000:
          plot_end = 2 * math.pi
      return update
  
imports: import math
  import pandas
  import gradio
  import datetime
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: get_plot(period) and returns: update