def __contains__(self, item):
        """Checks if the layer is inside the packet.

        :param item: name of the layer
        """
        try:
            self[item]
            return True
        except KeyError:
            return False
Checks if the layer is inside the packet.

        :param item: name of the layer
        
src/pyshark/packet/packet.py