code: def from_dict(cls, d):
          
          def _node(obj):
              return Node(
                  obj.get('nodeid'),
                  Pred.surface_or_abstract(obj.get('predicate')),
                  sortinfo=obj.get('sortinfo'),
                  lnk=_lnk(obj.get('lnk')),
                  surface=obj.get('surface'),
                  base=obj.get('base'),
                  carg=obj.get('carg')
              )
          def _link(obj):
              return Link(obj.get('from'), obj.get('to'),
                          obj.get('rargname'), obj.get('post'))
          def _lnk(o):
              return None if o is None else Lnk.charspan(o['from'], o['to'])
          return cls(
              nodes=[_node(n) for n in d.get('nodes', [])],
              links=[_link(l) for l in d.get('links', [])],
              lnk=_lnk(d.get('lnk')),
              surface=d.get('surface'),
              identifier=d.get('identifier')
          )
docs: Decode a dictionary, as from :meth:`to_dict`, into a Dmrs object.