<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def select_segments(self, jsonpath: str) -> List[Segment]: """ Dereferences the json_path inside the document and returns the selected elements. This method should compile and cache the compiled json_path in case the same path is reused by multiple extractors. Args: jsonpath (str):
 a valid JSON path. Returns: A list of Segments object that contains the elements selected by the json path. """

        path = self.etk.parse_json_path(jsonpath)
        matches = path.find(self.cdr_document)

        segments = list()
        for a_match in matches:
            this_segment = Segment(str(a_match.full_path), a_match.value, self)
            segments.append(this_segment)

        return segments