input: Write a python function to create and close a database connection using a class.
  assert isinstance(DatabaseConnection(), DatabaseConnection)
  assert hasattr(DatabaseConnection(), 'conn')
output: import sqlite3
  
  class DatabaseConnection:
      def __init__(self):
          self.conn = sqlite3.connect(':memory:')
      
      def close(self):
          self.conn.close()