code: def from_dict(cls, data: Dict[str, Any]) -> "GeneratedAnswer":
      init_params = data.get("init_parameters", {})
      if (documents := init_params.get("documents")) is not None:
          data["init_parameters"]["documents"] = [
              Document.from_dict(d) for d in documents
          ]
  
      return default_from_dict(cls, data)
  
file_path: haystack/haystack/dataclasses/answer.py
imports: import io
  from typing import Any, Dict, List, Optional, Protocol, runtime_checkable
  from dataclasses import dataclass, field, asdict
  from pandas import DataFrame, read_json
  from haystack.core.serialization import default_from_dict, default_to_dict
  from haystack.dataclasses.document import Document
label_desc: Use image node_id 2 for calling the GeneratedAnswer obj's underlying member method code with example usage: obj.from_dict(cls, data) and returns: default_from_dict