code: def expose(f=None, base=None, action=None, method=None, kind=BASIC):
      
      def expose_f(f):
          f.exposed = True
          f.exposed_action = action
          f.exposed_method = method
          f.exposed_kind = kind
          return f
  
      def register_f(f):
          f = expose_f(f)
          base.register(f, action or f.__module__, method or f.__name__)
          return f
  
      if f is not None:  # @expose case (no parameters)
          return expose_f(f)
      if base is not None:  # module-level function case
          return register_f
      return expose_f
docs: Decorator to expose a function
  
      .. note::
          A module function can be decorated but ``base`` parameter has to be specified
  
      :param f: function to expose
      :type f: function or None
      :param base: base class that can register the function
      :param string action: name of the exposed action that will hold the method
      :param string method: name of the exposed method
      :param kind: kind of the method
      :type kind: :data:`BASIC` or :data:`LOAD` or :data:`SUBMIT`