code: def from_spec(spec, kwargs=None):
          
          layer = util.get_object(
              obj=spec,
              predefined_objects=tensorforce.core.networks.layers,
              kwargs=kwargs
          )
          assert isinstance(layer, Layer)
          return layer
docs: Creates a layer from a specification dict.