def convert_directive_function(directive_fn):
 class FunctionalDirective(Directive, ):
  option_spec = getattr(directive_fn, 'options', None)
  has_content = getattr(directive_fn, 'content', False)
  _argument_spec = getattr(directive_fn, 'arguments', (0, 0, False))
  (required_arguments, optional_arguments, final_argument_whitespace) = _argument_spec
  def run(self):
   return directive_fn(self.name, self.arguments, self.options, self.content, self.lineno, self.content_offset, self.block_text, self.state, self.state_machine)
 return FunctionalDirective

def convert_directive_function ( directive_fn ) : class FunctionalDirective ( Directive , ) : option_spec = getattr ( directive_fn , 'options' , None ) has_content = getattr ( directive_fn , 'content' , False ) _argument_spec = getattr ( directive_fn , 'arguments' , ( 0 , 0 , False ) ) ( required_arguments , optional_arguments , final_argument_whitespace ) = _argument_spec def run ( self ) : return directive_fn ( self . name , self . arguments , self . options , self . content , self . lineno , self . content_offset , self . block_text , self . state , self . state_machine ) return FunctionalDirective
define & return a directive class generated from directive_fn .