code: def flash_progress_callback(action, progress_string, percentage):
      
      if action.lower() != 'compare':
          return progress_bar(min(100, percentage), 100, prefix=action)
  
      return None
docs: Callback that can be used with ``JLink.flash()``.
  
      This callback generates a progress bar in the console to show the progress
      of each of the steps of the flash.
  
      Args:
        action (str): the current action being invoked
        progress_string (str): the current step in the progress
        percentage (int): the percent to which the current step has been done
  
      Returns:
        ``None``
  
      Note:
        This function ignores the compare action.