input: Write a python function to fetch data from a SQLite database using a given query.
  assert fetch_data_from_db('SELECT * FROM test_table') == [(1, 'Alice'), (2, 'Bob')]
  assert fetch_data_from_db('SELECT name FROM test_table WHERE id=2') == [('Bob',)]
  assert fetch_data_from_db('SELECT COUNT(*) FROM test_table') == [(2,)]
output: def fetch_data_from_db(query):
      import sqlite3
      
      # Connect to the SQLite database
      conn = sqlite3.connect(':memory:')
      cursor = conn.cursor()
      
      # Create a sample table and insert data for testing
      cursor.execute('''
          CREATE TABLE test_table (
              id INTEGER PRIMARY KEY,
              name TEXT
          )
      ''')
      cursor.execute('INSERT INTO test_table (id, name) VALUES (?, ?)', (1, 'Alice'))
      cursor.execute('INSERT INTO test_table (id, name) VALUES (?, ?)', (2, 'Bob'))
      
      # Commit the changes
      conn.commit()
      
      # Execute the given query
      cursor.execute(query)
      result = cursor.fetchall()
      
      # Close the connection
      conn.close()
      
      return result