def METHOD_NAME(p):
    # Given
    slug = p['slug']
    expected = p['expected']
    # When
    actual = SeriesIdentifier.from_slug(slug)
    # Then
    if expected is None:
        assert actual is None
    else:
        assert actual
        assert expected == actual
        assert expected.id == actual.id
        assert expected.indexer == actual.indexer
        assert expected.id != actual
        assert expected.indexer != actual