I've gotten stuck on the problem you suggested for me. I've figured out how to simulate dice rolls, but I'm not quite sure to calculate what the longest run of the sequence. Can you please help me write the `longest_run()` function? My code looks like this:

```python
import numpy as np

# first, I need to simulate a die with 6 sides and roll it 100 times.
# second, I need to calculate the longest run for those rolls
# third, I need to do repeat steps 1 and 2 many times. 1000x sounds good for now.
# last, I need to calculate the average value of those 1000 longest runs.


def roll_die(sides = 6, rolls = 100):
    # roll an m-sided die, n times. 
    outcomes = np.random.randint(0, sides, rolls)

    return outcomes


def longest_run(outcomes):
    ### TO DO ###
    # need to iterate over outcomes and update a counter
    # how do I keep track of the longest runs?

    return 0


def run_experiments(sides = 6, rolls = 100, num_experiments = 1000):
    # create empty list to populate during experiments
    all_max_runs = []

    for _ in range(num_experiments):
        outcomes = roll_die(sides = sides, rolls = rolls)
        tmp_max_run = longest_run(outcomes)
        all_max_runs.append(tmp_max_run)

    # calculate average length of the longest run
    mean_max_run = np.mean(all_max_runs)

    return mean_max_run

```
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence