code: def from_dict(cls, d):
          
          read = lambda cls: (lambda pair: (pair[0], cls.from_dict(pair[1])))
          return cls(
              variables=map(read(Variable), d.get('variables', {}).items()),
              properties=map(read(Property), d.get('properties', {}).items()),
              roles=map(read(Role), d.get('roles', {}).items()),
              predicates=map(read(Predicate), d.get('predicates', {}).items())
          )
docs: Instantiate a SemI from a dictionary representation.