docs: def scale_library_ports_meta_data(state_m, gaphas_editor=True):
      """Scale the ports of library model accordingly relative to state_copy meta size.
      
      The function assumes that the meta data of ports of the state_copy of the library was copied to 
      respective elements in the library and that those was not adjusted before.
      """
      if state_m.meta_data_was_scaled:
          return
      state_m.income.set_meta_data_editor('rel_pos', state_m.state_copy.income.get_meta_data_editor()['rel_pos'])
      # print("scale_library_ports_meta_data ", state_m.get_meta_data_editor()['size'], \)
      #     state_m.state_copy.get_meta_data_editor()['size']
      factor = divide_two_vectors(state_m.get_meta_data_editor()['size'],
                                  state_m.state_copy.get_meta_data_editor()['size'])
  
      # print("scale_library_ports_meta_data -> resize_state_port_meta", factor)
      if contains_geometric_info(factor):
          resize_state_port_meta(state_m, factor, True)
          state_m.meta_data_was_scaled = True
      else:
          logger.info("Skip resize of library ports meta data {0}".format(state_m))