class_docstr: Adapt msg protocol v5 to v4
class_docstr_tok: ["Adapt","msg","protocol","v5","to","v4"]
docstr: Handle a complete reply.
docstr_tok: ["Handle","a","complete","reply","."]
code: def complete_reply(self, msg: Dict[str, Any]) -> Dict[str, Any]:
      """Handle a complete reply."""
      content = msg["content"]
      cursor_start = content.pop("cursor_start")
      cursor_end = content.pop("cursor_end")
      match_len = cursor_end - cursor_start
      content["matched_text"] = content["matches"][0][:match_len]
      content.pop("metadata", None)
      return msg
  
imports: import json
  import re
  from typing import Any, Dict, List, Tuple
  from ._version import protocol_version_info
label_desc: Use image node_id 6 for calling the V5toV4 obj's underlying member method code with example usage: obj.complete_reply(msg) and returns: msg