code: def do_erase(self):
          
          self._increase_logging(["pyocd.tools.loader", "pyocd"])
          
          session = ConnectHelper.session_with_chosen_probe(
                              project_dir=self._args.project_dir,
                              config_file=self._args.config,
                              user_script=self._args.script,
                              no_config=self._args.no_config,
                              pack=self._args.pack,
                              unique_id=self._args.unique_id,
                              target_override=self._args.target_override,
                              frequency=self._args.frequency,
                              blocking=False,
                              **convert_session_options(self._args.options))
          if session is None:
              sys.exit(1)
          with session:
              mode = self._args.erase_mode or loader.FlashEraser.Mode.SECTOR
              eraser = loader.FlashEraser(session, mode)
              
              addresses = flatten_args(self._args.addresses)
              eraser.erase(addresses)
docs: ! @brief Handle 'erase' subcommand.