parameters: (conn: Connection)
return_statement: return events
docstring: Parse an sqlite database containing an NVTX_EVENTS table and return a
      list of Events.
docstring_summary: Parse an sqlite database containing an NVTX_EVENTS table and return a
      list of Events.
docstring_tokens: Parse an sqlite database containing an NVTX_EVENTS table and return a list of Events .
function: def get_sqlite_events(conn: Connection) -> List[Event]:
      """Parse an sqlite database containing an NVTX_EVENTS table and return a
      list of Events."""
      events: List[Event] = []
  
      # check if table exists
      cursor = conn.execute(
          "SELECT count(*) FROM sqlite_master WHERE type='table' AND name='NVTX_EVENTS'"
      )
      does_table_exist = cursor.fetchone()[0] > 0
      if not does_table_exist:
          return events
  
      # select events
      cursor = conn.execute("SELECT text, globalTid, start, end from NVTX_EVENTS")
  
      for row in cursor:
          events.append(Event(*row))
  
      return events
function_tokens: def get_sqlite_events ( conn : Connection ) -> List [ Event ] : events : List [ Event ] = [ ] # check if table exists cursor = conn . execute ( "SELECT count(*) FROM sqlite_master WHERE type='table' AND name='NVTX_EVENTS'" ) does_table_exist = cursor . fetchone ( ) [ 0 ] > 0 if not does_table_exist : return events # select events cursor = conn . execute ( "SELECT text, globalTid, start, end from NVTX_EVENTS" ) for row in cursor : events . append ( Event ( * row ) ) return events