code: def check_recovery(working_dir):
      
      recovery_start_block, recovery_end_block = get_recovery_range(working_dir)
      if recovery_start_block is not None and recovery_end_block is not None:
          local_current_block = virtualchain_hooks.get_last_block(working_dir)
          if local_current_block <= recovery_end_block:
              return True
  
          # otherwise, we're outside the recovery range and we can clear it
          log.debug('Chain state is at block {}, and is outside the recovery window {}-{}'.format(local_current_block, recovery_start_block, recovery_end_block))
          clear_recovery_range(working_dir)
          return False
  
      else:
          # not recovering
          return False
docs: Do we need to recover on start-up?