code: def str_presenter(dmpr, data):
      
      if is_multiline(data):
          return dmpr.represent_scalar('tag:yaml.org,2002:str', data, style='|')
      return dmpr.represent_scalar('tag:yaml.org,2002:str', data)
docs: Return correct str_presenter to write multiple lines to a yaml field.
  
  
      Source: http://stackoverflow.com/a/33300001