code: def plot_evolution(data: np.ndarray, **kwargs) -> go.Figure:
      """
      Plot data over steps.
  
      Args:
          data: Data of shape [steps, iterations] or [steps] to plot.
              In the first case mean and stdd over steps are plotted.
          kwargs: Keyword arguments to update the figure layout.
      Returns:
          The plotly figure of the plot.
      """
  
      mean = data
      if data.ndim > 1:
          mean = data.mean(axis=0)
  
      x = list(range(len(mean)))
      plot_data = [
          go.Scatter(
              name="mean",
              x=x,
              y=mean,
              mode="lines",
          )
      ]
  
      if data.ndim > 1:
          stdd = data.std(axis=0)
          x_round = np.append(x, x[::-1])
          plot_data += [
              go.Scatter(
                  x=x_round,
                  y=np.append(mean + stdd, (mean - stdd)[::-1]),
                  fill="toself",
                  fillcolor="rgba(0,100,80,0.4)",
                  line=dict(color="rgba(255,255,255,0)"),
                  name="stdd",
              ),
              go.Scatter(
                  x=x_round,
                  y=np.append(data.max(axis=0), data.min(axis=0)[::-1]),
                  fill="toself",
                  fillcolor="rgba(68, 68, 68, 0.2)",
                  line=dict(color="rgba(255,255,255,0)"),
                  name="range",
              ),
          ]
  
      fig = go.Figure(plot_data)
      fig.update_layout(**kwargs, hovermode="x")
      return fig
  
imports: import copy
  import hashlib
  from pathlib import Path
  from typing import List, Set, Union
  import numpy
  import plotly.graph_objs
  import torch
  import torch.distributed
  import wandb
  from hydra.core.hydra_config import HydraConfig
  from hydra.utils import instantiate, to_absolute_path
  from improved_diffusion import dist_util
  from improved_diffusion import gaussian_diffusion
  from improved_diffusion import logger, respace, train_util
  from omegaconf import DictConfig, OmegaConf
label_desc: Use image node_id 7 for calling a global function with example usage: plot_evolution(data) and returns: fig