code: def _update_actions_len(self):
          
          if isinstance(self.actions, ListOfActions):
              self.actions_len = self.actions.get_size()
          else:
              self.actions_len = ListOfActions(self.actions).get_size()
docs: Update the actions_len field based on actions value.