import requests
import csv


def hello_cereal(context):
    """Example of a Dagster solid that retrieves data from HTTP source."""
    # Assuming the dataset is in the same directory as this file
    response = requests.get("https://docs.dagster.io/assets/cereal.csv")
    lines = response.text.split("\n")
    cereals = list(csv.DictReader(lines))

    context.log.info("Found {n_cereals} cereals".format(n_cereals=len(cereals)))

    return cereals