code: def on_step_end(
      self,
      args: TrainingArguments,
      state: TrainerState,
      control: TrainerControl,
      **kwargs: Any,
  ) -> None:
      # state.epoch is not None only during training.
      if state.epoch and self.searcher_unit == "batches":
          if state.is_world_process_zero:
              self.current_op.report_progress(state.global_step)
  
          if state.global_step >= self.current_op.length:
              logger.info(
                  f"Max length of {self.current_op.length} steps reached for current "
                  f"searcher operation. Updating searcher."
              )
              self._update_searcher(state, control)
  
imports: import json
  import logging
  import os
  from typing import Any, Dict, List, Optional, Tuple
  from transformers import TrainerCallback, TrainerControl, TrainerState, TrainingArguments
  from transformers.trainer_utils import get_last_checkpoint
  import determined
label_desc: Use image node_id 7 for calling the DetCallback obj's underlying member method code with example usage: obj.on_step_end(args, state, control) without return types