code: def register(name, func=None):
      
  
      def decorator(func):
          # Perform the registration
          ControlDaemon._register(name, func)
          return func
  
      # If func was given, call the decorator, otherwise, return the
      # decorator
      if func:
          return decorator(func)
      else:
          return decorator
docs: Function or decorator which registers a given function as a
      recognized control command.