class_docstr: Represents a graph for training a model or making predictions.
class_docstr_tok: ["Represents","a","graph","for","training","a","model","or","making","predictions","."]
docstr: Loads a graph schema which has been serialized using `schema.as_dict()`.
  
  Args:
      serialized_graph_schema: A serialized graph schema.
  
  Returns:
      A properly loaded schema.
  
  Raises:
      GraphSchemaException: In case the component class for a node couldn't be
          found.
code: def from_dict(
      cls, serialized_graph_schema: Dict[Text, Any]
  ) -> GraphSchema:
      """Loads a graph schema which has been serialized using `schema.as_dict()`.
  
      Args:
          serialized_graph_schema: A serialized graph schema.
  
      Returns:
          A properly loaded schema.
  
      Raises:
          GraphSchemaException: In case the component class for a node couldn't be
              found.
      """
      nodes = {}
      for node_name, serialized_node in serialized_graph_schema[
          "nodes"
      ].items():
          try:
              serialized_node[
                  "uses"
              ] = rasa.shared.utils.common.class_from_module_path(
                  serialized_node["uses"]
              )
  
              resource = serialized_node["resource"]
              if resource:
                  serialized_node["resource"] = Resource(**resource)
  
          except ImportError as e:
              raise GraphSchemaException(
                  "Error deserializing graph schema. Can't "
                  "find class for graph component type "
                  f"'{serialized_node['uses']}'."
              ) from e
  
          nodes[node_name] = SchemaNode(**serialized_node)
  
      return GraphSchema(nodes)
  
imports: from __future__ import annotations
  import dataclasses
  from abc import ABC, abstractmethod
  from dataclasses import dataclass, field
  import logging
  from typing import Any, Callable, Dict, List, Optional, Text, Type, Tuple, Union
  from rasa.engine.exceptions import GraphComponentException, GraphRunError, GraphSchemaException
  import rasa.shared.utils.common
  import rasa.utils.common
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.exceptions import InvalidConfigException, RasaException
  from rasa.shared.data import TrainingType
label_desc: Use image node_id 2 for calling the GraphSchema obj's underlying member method code with example usage: obj.from_dict(cls, serialized_graph_schema) and returns: GraphSchema