def _process_if_nonempty(processor, name, settings):
 name = name.strip()
 return (processor(name, settings) if name else _DISCARD)

def _process_if_nonempty ( processor , name , settings ) : name = name . strip ( ) return ( processor ( name , settings ) if name else _DISCARD )
removes extra whitespace from name and applies a metadata processor .