def METHOD_NAME(self):
    engine = stdpopsim.get_engine("msprime")
    species = stdpopsim.get_species("HomSap")
    contig = species.get_contig("chr1")
    model = stdpopsim.PiecewiseConstantSize(species.population_size)
    samples = [1, 2, ["foo"]]
    with pytest.raises(ValueError, match="Samples must be a dict"):
        engine.simulate(
            demographic_model=model,
            contig=contig,
            samples=samples,
        )