code: def add(P, color):
      P = np.array(P)
      if len(P) < 2:
          return
      P = np.array(P) / 20.0 + (5, -2)
      p = np.zeros((len(P), 3))
      p[:, :2] = P
      p = unique_rows(p)
      if len(p) > 1:
          paths.append(p, closed=True)
      if len(p) > 2:
          polys.append(p, color=color)
  
file_path: vispy/examples/collections/chloropleth.py
imports: import json
  import numpy
  from vispy import app, gloo
  from vispy.util import load_data_file
  from vispy.visuals.collections import PathCollection, PolygonCollection
  from vispy.visuals.transforms import PanZoomTransform
label_desc: Use image node_id 2 for calling a global function with example usage: add(P, color) without return types