def validate_no_arg_method(interface, method_name):
 for (name, method) in interface.namesAndDescriptions():
  if (name == method_name):
   if (len(method.getSignatureInfo()['required']) > 0):
    raise InvalidMethod('Method {!r} requires parameters'.format(method_name))
   return
 raise InvalidMethod('Method {!r} not found in interface {}'.format(method_name, interface.__name__))

def validate_no_arg_method ( interface , method_name ) : for ( name , method ) in interface . namesAndDescriptions ( ) : if ( name == method_name ) : if ( len ( method . getSignatureInfo ( ) [ 'required' ] ) > 0 ) : raise InvalidMethod ( 'Method {!r} requires parameters' . format ( method_name ) ) return raise InvalidMethod ( 'Method {!r} not found in interface {}' . format ( method_name , interface . __name__ ) )
check that method name exists in interface and requires no parameters .