def display_name_with_default(block):
 return (block.display_name if (block.display_name is not None) else url_name_for_block(block).replace('_', ' '))

def display_name_with_default ( block ) : return ( block . display_name if ( block . display_name is not None ) else url_name_for_block ( block ) . replace ( '_' , ' ' ) )
calculates the display name for a block .