docs: def scale_meta_data_according_states(models_dict):
      """ Offset meta data of state elements according the area used indicated by the states and
      maybe scoped variables (in case of OpenGL editor) meta data.
  
      Method is used by group states to set the offset for the elements in the new container state.
      The method needs some generalisation to create methods to easily scale meta data according new parents or views
      (e.g. to show inner elements of s library state).
  
      :param models_dict: dictionary that hold lists of meta data with state attribute consistent keys
      :return:
      """
      left, right, top, bottom = get_boundaries_of_elements_in_dict(models_dict=models_dict)
  
      parent_size = models_dict['state'].parent.get_meta_data_editor()['size']
      _, rel_pos, size = cal_frame_according_boundaries(left, right, top, bottom, parent_size)
  
      # Set size and position of new container state
      models_dict['state'].set_meta_data_editor('rel_pos', rel_pos)
      models_dict['state'].set_meta_data_editor('size', size)
      offset = mult_two_vectors((-1., -1.), rel_pos)
      offset_rel_pos_of_all_models_in_dict(models_dict, offset)
  
      return True