code: def method(method_class):
      
  
      def callback(scanner, name, method_class):
          if method_class.actions is not None:
              actions = method_class.actions
          else:
              actions = [name]
  
          if method_class.versions is not None:
              versions = method_class.versions
          else:
              versions = [None]
  
          for action in actions:
              for version in versions:
                  scanner.registry.add(method_class,
                                       action=action,
                                       version=version)
  
      from venusian import attach
      attach(method_class, callback, category="method")
      return method_class
docs: Decorator to use to mark an API method.
  
      When invoking L{Registry.scan} the classes marked with this decorator
      will be added to the registry.
  
      @param method_class: The L{Method} class to register.