docs: def update_meta_data_for_state_view(graphical_editor_view, state_v, affects_children=False, publish=True):
      """This method updates the meta data of a state view
  
      :param graphical_editor_view: Graphical Editor view the change occurred in
      :param state_v: The state view which has been changed/moved
      :param affects_children: Whether the children of the state view have been resized or not
      :param publish: Whether to publish the changes of the meta data
      """
      from gaphas.item import NW
  
      # Update all port meta data to match with new position and size of parent
      update_meta_data_for_port(graphical_editor_view, state_v, None)
  
      if affects_children:
          update_meta_data_for_name_view(graphical_editor_view, state_v.name_view, publish=False)
          for transition_v in state_v.get_transitions():
              update_meta_data_for_transition_waypoints(graphical_editor_view, transition_v, None, publish=False)
          for child_state_v in state_v.child_state_views():
              update_meta_data_for_state_view(graphical_editor_view, child_state_v, True, publish=False)
  
      rel_pos = calc_rel_pos_to_parent(graphical_editor_view.editor.canvas, state_v, state_v.handles()[NW])
  
      state_v.model.set_meta_data_editor('size', (state_v.width, state_v.height))
      state_v.model.set_meta_data_editor('rel_pos', rel_pos)
  
      if publish:
          graphical_editor_view.emit('meta_data_changed', state_v.model, "size", affects_children)