def METHOD_NAME(self, text):
    # Greedy search for 1st json candidate.
    match = re.search(
        r"\{.*\}", text.strip(), re.MULTILINE | re.IGNORECASE | re.DOTALL
    )
    json_str = ""
    if match: json_str = match.group()
    json_object = json.loads(json_str, strict=False)
    final_object = self.pydantic_object.parse_obj(json_object)
    return final_object