code: def register_element(self, model, idx):
          
  
          if idx is None:
              idx = model + '_' + str(len(self._idx_model))
  
          self._idx_model[idx] = model
          self._idx.append(idx)
  
          return idx
docs: Register element with index ``idx`` to ``model``
  
          :param model: model name
          :param idx: element idx
          :return: final element idx