This code came as a result of using the following modules in Drupal 7:
node_display_title
entity_reference_multiple
The output returned from entity ref mult was unalterable and used the default entity label in the markup. I was unable to theme the field and didn't want to alter the markup so implemented these hooks to change the label itself. Rather dangerous but it does fall back gracefully to the default node title.