def METHOD_NAME(self, action_spaces, inv_offset):
    db_r_space, db_e_space, db_action_mask = [], [], []
    for (r_space, e_space), action_mask in action_spaces:
        db_r_space.append(r_space)
        db_e_space.append(e_space)
        db_action_mask.append(action_mask)
    r_space = model_utilities.pad_and_cat(db_r_space, padding_value=self.kg.dummy_r)[inv_offset]
    e_space = model_utilities.pad_and_cat(db_e_space, padding_value=self.kg.dummy_e)[inv_offset]
    action_mask = model_utilities.pad_and_cat(db_action_mask, padding_value=0)[inv_offset]
    action_space = ((r_space, e_space), action_mask)
    return action_space