code: def update_dir_state(self):
          
  
          if self.dir_start and not self.after_start:
              self.set_after_start()
          elif not self.dir_start and self.after_start:
              self.reset_dir_track()
docs: Update the directory state.
  
          If we are at the directory start,
          update to after start state (the character right after).
          If at after start, reset state.