def simple_parse_to_segments(formatted_text):
 if ('message_parser' in dir(hangups)):
  segments = hangups.ChatMessageSegment.from_str(formatted_text)
 else:
  segments = kludgy_html_parser.simple_parse_to_segments(formatted_text)
 return segments

def simple_parse_to_segments ( formatted_text ) : if ( 'message_parser' in dir ( hangups ) ) : segments = hangups . ChatMessageSegment . from_str ( formatted_text ) else : segments = kludgy_html_parser . simple_parse_to_segments ( formatted_text ) return segments
send formatted chat message legacy notice: identical function in kludgy_html_parser the older function is "overridden" here for compatibility reasons .