code: def plot_any_command(args, plot_func, plot_func_kwargs=None):
      if plot_func_kwargs is None:
          plot_func_kwargs = {}
      if args.outfile:
          import matplotlib
  
          matplotlib.use("Agg")
      if args.label is None:
          args.label = []
  
      import matplotlib.pyplot as plt
  
      plt.figure()
      for i, inp in enumerate(args.inputs):
          label = args.label[i] if len(args.label) > i else inp
          plot_func(
              inp, plot_kwargs=dict(label=label), **plot_func_kwargs
          )
      plt.legend(loc="best")
      if args.title:
          plt.title(args.title)
      if args.xlabel:
          plt.xlabel(args.xlabel)
      if args.ylabel:
          plt.ylabel(args.ylabel)
      if args.xlim_min is not None:
          plt.xlim(left=args.xlim_min)
      if args.xlim_max is not None:
          plt.xlim(right=args.xlim_max)
      if args.ylim_min is not None:
          plt.ylim(bottom=args.ylim_min)
      if args.ylim_max is not None:
          plt.ylim(top=args.ylim_max)
      if args.outfile:
          plt.savefig(args.outfile)
          return
      plt.show()
  
label_desc: Use image node_id 3 for calling a global function with example usage: plot_any_command(args, plot_func, plot_func_kwargs) without return types