def check_arguments_for_rescoring(usage_key):
 descriptor = modulestore().get_item(usage_key)
 if ((not hasattr(descriptor, 'module_class')) or (not hasattr(descriptor.module_class, 'rescore_problem'))):
  msg = 'Specified module does not support rescoring.'
  raise NotImplementedError(msg)

def check_arguments_for_rescoring ( usage_key ) : descriptor = modulestore ( ) . get_item ( usage_key ) if ( ( not hasattr ( descriptor , 'module_class' ) ) or ( not hasattr ( descriptor . module_class , 'rescore_problem' ) ) ) : msg = 'Specified module does not support rescoring.' raise NotImplementedError ( msg )
do simple checks on the descriptor to confirm that it supports rescoring .