docs: def add_state_view_for_model(self, state_m, parent_v=None, rel_pos=(0, 0), size=(100, 100), hierarchy_level=1):
          """Creates a `StateView` (recursively) and adds it to the canvas
  
          The method uses the `StateModel` `state_m` to create the according `StateView`. For all content within 
          `state_m`, such as connections, states and ports, the views are also created. All views are added to the canvas.
  
          :param rafcon.gui.models.state.StateModel state_m: The state to be drawn
          :param rafcon.gui.mygaphas.items.state.StateView parent_v: The parent state view of new state view `state_m`
          :param tuple rel_pos: The default relative position (x, y) if there is no relative position stored
          :param tuple size: The default size (width, height) if there is no size stored
          :param float hierarchy_level: The hierarchy level of the state
          :return: The created `StateView`
          :rtype: StateView
          """
          assert isinstance(state_m, AbstractStateModel)
          state_meta = state_m.get_meta_data_editor()
  
          # Use default values if no size information is stored
          if not gui_helper_meta_data.contains_geometric_info(state_meta['size']):
              state_meta = state_m.set_meta_data_editor('size', size)
  
          size = state_meta['size']
  
          # Use default values if no position information is stored
          if not gui_helper_meta_data.contains_geometric_info(state_meta['rel_pos']):
              state_meta = state_m.set_meta_data_editor('rel_pos', rel_pos)
  
          rel_pos = state_meta['rel_pos']
  
          if isinstance(state_m, LibraryStateModel):
              if not state_m.meta_data_was_scaled:
                  gui_helper_meta_data.scale_library_ports_meta_data(state_m, gaphas_editor=True)
  
          state_v = StateView(state_m, size, hierarchy_level)
  
          # Draw state above data flows and NameView but beneath transitions
          num_data_flows = len(state_m.state.parent.data_flows) if isinstance(state_m.parent, ContainerStateModel) else 0
          index = 1 if not parent_v else num_data_flows + 1
          # if self.model.root_state is state_m:
          #     print("init root_state", state_m, state_v)
          # else:
          #     print("init state", state_m, state_v)
          # print([hash(elem) for elem in state_m.state.outcomes.values()])
          self.canvas.add(state_v, parent_v, index=index)
          state_v.matrix.translate(*rel_pos)
  
          state_v.add_income(state_m.income)
  
          for outcome_m in state_m.outcomes:
              state_v.add_outcome(outcome_m)
  
          for input_port_m in state_m.input_data_ports:
              state_v.add_input_port(input_port_m)
  
          for output_port_m in state_m.output_data_ports:
              state_v.add_output_port(output_port_m)
  
          if parent_v is not None:
              # Keep state within parent
              pass
  
          if isinstance(state_m, LibraryStateModel) and state_m.show_content() and state_m.state_copy_initialized:
              gui_helper_meta_data.scale_library_content(state_m)
              self.add_state_view_for_model(state_m.state_copy, state_v, hierarchy_level=hierarchy_level + 1)
  
          elif isinstance(state_m, ContainerStateModel):
              num_child_state = 0
  
              for scoped_variable_m in state_m.scoped_variables:
                  state_v.add_scoped_variable(scoped_variable_m)
  
              for child_state_m in state_m.states.values():
                  # generate optional meta data for child state - not used if valid meta data already in child state model
                  child_rel_pos, child_size = gui_helper_meta_data.generate_default_state_meta_data(state_m, self.canvas,
                                                                                                    num_child_state)
                  num_child_state += 1
  
                  self.add_state_view_for_model(child_state_m, state_v, child_rel_pos, child_size, hierarchy_level + 1)
  
              for transition_m in state_m.transitions:
                  self.add_transition_view_for_model(transition_m, state_m)
  
              for data_flow_m in state_m.data_flows:
                  self.add_data_flow_view_for_model(data_flow_m, state_m)
  
          return state_v