code: def perf(chart_name, length, series):
      chart = CHARTS_BY_NAME.get(chart_name)()
      for i in range(series):
          chart.add("s %d" % i, adapt(chart, rands[:length]))
      return chart
  
imports: import sys
  import timeit
  from random import sample
  from pygal import CHARTS, CHARTS_BY_NAME
  from pygal.etree import etree
  from pygal.test import adapt
label_desc: Use image node_id 1 for calling a global function with example usage: perf(chart_name, length, series) and returns: chart