def get_field(self, name) -> typing.Union[LayerFieldsContainer, None]:
        """Gets the XML field object of the given name."""
        # Quicker in case the exact name was used.
        field = self._all_fields.get(name)
        if field is not None:
            return field

        for field_name, field in self._all_fields.items():
            if self._sanitize_field_name(name) == self._sanitize_field_name(field_name):
                return field
        return None
Gets the XML field object of the given name.
src/pyshark/packet/layers/xml_layer.py