input: Write a python function to create the `books` table with columns `id`, `title`, and `author`.
  assert create_books_table() == 'Table created successfully'
  assert table_exists('books') == True
output: def create_books_table():
      import sqlite3
      
      try:
          conn = sqlite3.connect(':memory:')  # Using in-memory database for demonstration
          cursor = conn.cursor()
          
          cursor.execute('''
          CREATE TABLE IF NOT EXISTS books (
              id INTEGER PRIMARY KEY,
              title TEXT NOT NULL,
              author TEXT NOT NULL
          )
          ''')
          
          conn.commit()
          return 'Table created successfully'
      except sqlite3.Error as e:
          return f"An error occurred: {e}"
      finally:
          conn.close()
  
  def table_exists(table_name):
      import sqlite3
      
      try:
          conn = sqlite3.connect(':memory:')  # Using the same in-memory database
          cursor = conn.cursor()
          
          cursor.execute('''
          CREATE TABLE IF NOT EXISTS books (
              id INTEGER PRIMARY KEY,
              title TEXT NOT NULL,
              author TEXT NOT NULL
          )
          ''')
          
          cursor.execute(f"SELECT name FROM sqlite_master WHERE type='table' AND name='{table_name}'")
          result = cursor.fetchone()
          return result is not None
      except sqlite3.Error as e:
          return f"An error occurred: {e}"
      finally:
          conn.close()