code: def layerize(begin_update=None, predict=None, *args, **kwargs):
      
      if begin_update is not None:
          return FunctionLayer(begin_update, predict=predict, *args, **kwargs)
  
      def wrapper(begin_update):
          return FunctionLayer(begin_update, *args, **kwargs)
  
      return wrapper
docs: Wrap a function into a layer