def _check_subject(class_subject, input_subject, raise_error=True):
 if (input_subject is not None):
  if (not isinstance(input_subject, string_types)):
   raise ValueError('subject input must be a string')
  else:
   return input_subject
 elif (class_subject is not None):
  if (not isinstance(class_subject, string_types)):
   raise ValueError('Neither subject input nor class subject attribute was a string')
  else:
   return class_subject
 else:
  if (raise_error is True):
   raise ValueError('Neither subject input nor class subject attribute was a string')
  return None

def _check_subject ( class_subject , input_subject , raise_error = True ) : if ( input_subject is not None ) : if ( not isinstance ( input_subject , string_types ) ) : raise ValueError ( 'subject input must be a string' ) else : return input_subject elif ( class_subject is not None ) : if ( not isinstance ( class_subject , string_types ) ) : raise ValueError ( 'Neither subject input nor class subject attribute was a string' ) else : return class_subject else : if ( raise_error is True ) : raise ValueError ( 'Neither subject input nor class subject attribute was a string' ) return None
get subject name from class .