code: def generate(pseudo_ast, language):
      '''
      generate output code in `language`
  
      `pseudo_ast` can be a plain `dict` with ast data or
      it can use the internal `pseudo` `Node(type, **fields)` format
  
      if you want to play with it, you can use `generate_main` which 
      expects just a dict node / a list of dict nodes and a language
  
      `language` can be 'py', 'python', 'rb', 'ruby',
        'javascript', 'js', 'cs', 'csharp', 'go' or 'cpp'
      '''
  
      if isinstance(pseudo_ast, dict):
          pseudo_ast = pseudo.loader.convert_to_syntax_tree(pseudo_ast)
      translated_ast = API_TRANSLATORS[language](pseudo_ast).api_translate()
      return GENERATORS[language]().generate(translated_astf generate(pseudo_ast, language):
      '''
      generate output code in `language`
  
      `pseudo_ast` can be a plain `dict` with ast data or
      it can use the internal `pseudo` `Node(type, **fields)` format
  
      if you want to play with it, you can use `generate_main` which 
      expects just a dict node / a list of dict nodes and a language
  
      `language` can be 'py', 'python', 'rb', 'ruby',
        'javascript', 'js', 'cs', 'csharp', 'go' or 'cpp'
      '''
  
      if isinstance(pseudo_ast, dict):
          pseudo_ast = pseudo.loader.convert_to_syntax_tree(pseudo_ast)
      translated_ast = API_TRANSLATORS[language](pseudo_ast).api_translate()
      return GENERATORS[language]().generate(translated_ast)
docs: generate output code in `language`
  
      `pseudo_ast` can be a plain `dict` with ast data or
      it can use the internal `pseudo` `Node(type, **fields)` format
  
      if you want to play with it, you can use `generate_main` which 
      expects just a dict node / a list of dict nodes and a language
  
      `language` can be 'py', 'python', 'rb', 'ruby',
        'javascript', 'js', 'cs', 'csharp', 'go' or 'cpp'