def _environment_sanity_check(environment):
 assert issubclass(environment.undefined, Undefined), 'undefined must be a subclass of undefined because filters depend on it.'
 assert (environment.block_start_string != environment.variable_start_string != environment.comment_start_string), 'block, variable and comment start strings must be different'
 assert (environment.newline_sequence in ('\r', '\r\n', '\n')), 'newline_sequence set to unknown line ending string.'
 return environment

def _environment_sanity_check ( environment ) : assert issubclass ( environment . undefined , Undefined ) , 'undefined must be a subclass of undefined because filters depend on it.' assert ( environment . block_start_string != environment . variable_start_string != environment . comment_start_string ) , 'block, variable and comment start strings must be different' assert ( environment . newline_sequence in ( '\r' , '\r\n' , '\n' ) ) , 'newline_sequence set to unknown line ending string.' return environment
perform a sanity check on the environment .