code: def extract_translations(self, string):
          
  
          tree = ast.parse(string)
          # ast_visit(tree)
          visitor = TransVisitor(
              self.tranz_functions,
              self.tranzchoice_functions)
          visitor.visit(tree)
  
          return visitor.translations
docs: Extract messages from Python string.