def METHOD_NAME(self, ax, flag):
    dqd = DataQualityDict()
    dqd['a'] = flag
    dqd['b'] = flag
    colls = ax.plot_dict(dqd)
    assert len(colls) == len(dqd)
    assert all(isinstance(c, PatchCollection) for c in colls)
    assert colls[0].get_label() == 'a'
    assert colls[1].get_label() == 'b'
    colls = ax.plot_dict(dqd, label='name')
    assert colls[0].get_label() == 'Test segments'
    colls = ax.plot_dict(dqd, label='anything')
    assert colls[0].get_label() == 'anything'