def title_or_url(node):
 title = getattr(node, 'display_name', None)
 if (not title):
  title = node.location.to_deprecated_string()
 return title

def title_or_url ( node ) : title = getattr ( node , 'display_name' , None ) if ( not title ) : title = node . location . to_deprecated_string ( ) return title
returns the display_name attribute of the passed in node of the course tree .