code: def win_callback(obj, event):
      global size
      if size != obj.GetSize():
          size_old = size
          size = obj.GetSize()
          size_change = [size[0] - size_old[0], 0]
          panel.re_align(size_change)
  
file_path: dipy/doc/examples/viz_advanced.py
imports: import numpy
  from dipy.data.fetcher import fetch_bundles_2_subjects, read_bundles_2_subjects
  from dipy.tracking.streamline import Streamlines
  from dipy.viz import actor, window, ui
label_desc: Use image node_id 6 for calling a global function with example usage: win_callback(obj, event) without return types