def _assert_samples(expected_names, observed_samples):
expected_names = set(expected_names)<EOL>assert all([isinstance(s, Sample) for s in observed_samples])<EOL>observed_names = {s.name for s in observed_samples}<EOL>assert expected_names == observed_names<EOL>
Assert that each observation is a sample and that the set of expected
Sample names agrees with the set of observed names.

:param Iterable[str] expected_names:
:param Iterable[Sample] observed_samples: collection of Sample objects,
    e.g. obtained with fetch_samples(), to which assertions apply