def binary_value(self) -> bytes:
        """Converts this field to binary (assuming it's a binary string)"""
        str_raw_value = str(self.raw_value)
        if len(str_raw_value) % 2 == 1:
            str_raw_value = '0' + str_raw_value

        return binascii.unhexlify(str_raw_value)
Converts this field to binary (assuming it's a binary string)
src/pyshark/packet/fields.py