code: def viz_vector_field(
      points_aligned,
      directions,
      colors,
      offsets,
      fname,
      bundle=None,
      interactive=False,
  ):
      """Render and plot vector field.
  
      Parameters
      ----------
      points_aligned : List
          List containing starting positions of vectors.
      directions : List
          List containing unitary directions of vectors.
      colors : List
          List containing colors for each vector.
      offsets : List
          List containing vector field modules.
      fname: str
          Rendered scene is stored in a png file with that name.
      bundle : Streamlines, optional
          Bundle to be rendered with vector field (Default None).
      interactive : boolean, optional
          If True a 3D interactive rendering is created. Default is True.
  
      """
      scene = window.Scene()
      scene.SetBackground(1.0, 1, 1)
      arrows = actor.arrow(
          points_aligned, directions, colors, scales=offsets
      )
      arrows.RotateX(-70)
      arrows.RotateZ(90)
      scene.add(arrows)
  
      if bundle:
          actor1 = actor.line(bundle, colors=(0, 0, 1))
          actor1.RotateX(-70)
          actor1.RotateZ(90)
          scene.add(actor1)
  
      if interactive:
          window.show(scene)
  
      window.record(
          scene, n_frames=1, out_path=fname, size=(1200, 1200)
      )
      if interactive:
          im = plt.imread(fname)
          plt.figure(figsize=(10, 10))
          plt.imshow(im)
  
imports: from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 3 for calling a global function with example usage: viz_vector_field(points_aligned, directions, colors, offsets, fname, bundle, interactive) without return types