def __contains__(self, item):
        try:
            self[item]
            return True
        except KeyError:
            return False
testing if the close button is closing the UI when clicked
dataset/ETHPy150Open KimiNewt/pyshark/src/pyshark/packet/packet.py/Packet.__contains__--crossover with--dataset/ETHPy150Open eoyilmaz/anima/tests/ui/test_reference_editor.py/ReferenceEditorTestCase.test_close_button_closes_the_UI