def get_field_as_list(self, name) -> list:
        """Helper function to get a certain field always as a list.

        Some fields may appear once or more in the packet. The field will appear as a list if it appears more
        than once. In order to avoid checking certain fields if they're lists or not, this function will
        return the field inside a list at all times.

        For example, in a DNS packet there may be one or more responses.
        A packet with with one response (www.google.com) will return:
            >>> print(pkt.dns.resp_name)
            "www.google.com"
        While a packet with two responses will return:
            >>> print(pkt.dns.resp_name)
            ["www.google.com", "www.google2.com"]

        To avoid this changing behaviour, use:
            >>> print(pkt.dns.get_field_as_list("resp_name"))
            ["www.google.com"]
        """
        field_value = self.get_field(name)
        if isinstance(field_value, list):
            return field_value
        return [field_value]
Helper function to get a certain field always as a list.

        Some fields may appear once or more in the packet. The field will appear as a list if it appears more
        than once. In order to avoid checking certain fields if they're lists or not, this function will
        return the field inside a list at all times.

        For example, in a DNS packet there may be one or more responses.
        A packet with with one response (www.google.com) will return:
            >>> print(pkt.dns.resp_name)
            "www.google.com"
        While a packet with two responses will return:
            >>> print(pkt.dns.resp_name)
            ["www.google.com", "www.google2.com"]

        To avoid this changing behaviour, use:
            >>> print(pkt.dns.get_field_as_list("resp_name"))
            ["www.google.com"]
        
src/pyshark/packet/layers/ek_layer.py