def _allmsgs(obj):
 if isinstance(obj, MultiMessage):
  return obj.messages
 elif (obj == BUBBLE):
  return []
 else:
  return [obj]

def _allmsgs ( obj ) : if isinstance ( obj , MultiMessage ) : return obj . messages elif ( obj == BUBBLE ) : return [ ] else : return [ obj ]
returns a list of all the messages encapsulated in obj .