class_docstr: A space representing graph information as a series of `nodes` connected with `edges` according to an adjacency matrix represented as a series of `edge_links`.
  
  Example usage::
  
      self.observation_space = spaces.Graph(node_space=space.Box(low=-100, high=100, shape=(3,)), edge_space=spaces.Discrete(3))
class_docstr_tok: ["A","space","representing","graph","information","as","a","series","of","`","nodes","`","connected","with","`","edges","`","according","to","an","adjacency","matrix","represented","as","a","series","of","`","edge_links","`",".","Example","usage",":",":","self.observation_space","=","spaces.Graph","(","node_space=space.Box","(","low=-100",",","high=100",",","shape=","(","3",",",")",")",",","edge_space=spaces.Discrete","(","3",")",")"]
docstr: Convert a JSONable data type to a batch of samples from this space.
docstr_tok: ["Convert","a","JSONable","data","type","to","a","batch","of","samples","from","this","space","."]
code: def from_jsonable(self, sample_n: Sequence[dict]) -> list:
      """Convert a JSONable data type to a batch of samples from this space."""
      ret = []
      for sample in sample_n:
          if "edges" in sample:
              ret_n = GraphInstance(
                  np.asarray(sample["nodes"]),
                  np.asarray(sample["edges"]),
                  np.asarray(sample["edge_links"]),
              )
          else:
              ret_n = GraphInstance(
                  np.asarray(sample["nodes"]),
                  None,
                  None,
              )
          ret.append(ret_n)
      return ret
  
file_path: gym/gym/spaces/graph.py
imports: from typing import NamedTuple, Optional, Sequence, Tuple, Union
  import numpy
  from gym.logger import warn
  from gym.spaces.box import Box
  from gym.spaces.discrete import Discrete
  from gym.spaces.multi_discrete import MultiDiscrete
  from gym.spaces.space import Space
label_desc: Use image node_id 9 for calling the Graph obj's underlying member method code with example usage: obj.from_jsonable(sample_n) and returns: ret