@staticmethod<EOL><INDENT>def from_spec(spec, kwargs=None):<DEDENT>
network = util.get_object(<EOL>obj=spec,<EOL>default_object=LayeredNetwork,<EOL>kwargs=kwargs<EOL>)<EOL>assert isinstance(network, Network)<EOL>return network<EOL>
Creates a network from a specification dict.