code: def pokedb():
      engine = sql.create_engine("sqlite://")  # in-memory
  
      # Load the fixtures
      here = os.path.dirname(os.path.realpath(__file__))
      with zipfile.ZipFile(os.path.join(here, "pokedb.zip")) as z:
          pokemons = json.loads(z.read("pokemons.json"))
          types = json.loads(z.read("types.json"))
          pokemon_types = json.loads(z.read("pokemon_types.json"))
  
      # Define the tables
      metadata = sql.MetaData()
  
      t_pokemons = sql.Table(
          "pokemons",
          metadata,
          sql.Column("id", sql.Integer, primary_key=True),
          sql.Column("name", sql.String),
          sql.Column("HP", sql.Integer),
          sql.Column("Attack", sql.Integer),
          sql.Column("Defense", sql.Integer),
          sql.Column("Sp. Attack", sql.Integer),
          sql.Column("Sp. Defense", sql.Integer),
          sql.Column("Speed", sql.Integer),
      )
  
      t_types = sql.Table(
          "types",
          metadata,
          sql.Column("id", sql.Integer, primary_key=True),
          sql.Column("name", sql.String),
      )
  
      t_pokemon_types = sql.Table(
          "pokemon_types",
          metadata,
          sql.Column("pokemon_id", sql.Integer, primary_key=True),
          sql.Column("type_id", sql.Integer, primary_key=True),
          sql.Column("no", sql.Integer, primary_key=True),
      )
  
      # Create the tables
      metadata.create_all(engine)
  
      # Insert the fixtures
      with engine.connect() as conn:
          conn.execute(t_pokemons.insert(), pokemons)
          conn.execute(t_types.insert(), types)
          conn.execute(t_pokemon_types.insert(), pokemon_types)
          conn.commit()
  
      return engine
  
file_path: river/river/stream/test_sql.py
imports: from __future__ import annotations
  import json
  import os
  import zipfile
  import pytest
  import sqlalchemy
  from river import stream
label_desc: Use image node_id 1 for calling a global function with example usage: pokedb() and returns: engine