code: def stop_db_session(exc=None):
      
      # print('==> Stop session', type(exc))
  
      if has_db_session():
          exc_type = None
          tb = None
  
          if exc:
              exc_type, exc, tb = get_exc_info(exc)
  
          db_session.__exit__(exc_type, exc, tb)
docs: Stops the last db_session