def METHOD_NAME(self, presenter, annotation):
    # A RangeSelector that starts and ends in the same element should be
    # rewritten to an XPathSelector refinedBy a TextPositionSelector, for
    # the sake of simplicity.
    annotation.target_selectors = [
        {
            "type": "RangeSelector",
            "startContainer": "/div[1]/main[1]/article[1]/div[2]/p[339]",
            "startOffset": 12,
            "endContainer": "/div[1]/main[1]/article[1]/div[2]/p[339]",
            "endOffset": 43,
        }
    ]
    result = presenter.asdict()
    assert result["target"][0]["selector"] == [
        {
            "type": "XPathSelector",
            "value": "/div[1]/main[1]/article[1]/div[2]/p[339]",
            "refinedBy": {"type": "TextPositionSelector", "start": 12, "end": 43},
        }
    ]