(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-o)} {(nounset)})
    (C {(Id.KW_Set set)} {(-o)} {(pipefail)})
    (C {(Id.KW_Set set)} {(-o)} {(errexit)})
    (C {(readonly)} {(Id.Lit_VarLike 'TIMEFORMAT=') (SQ <'%R'>)})
    (command.ShFunction
      name: strace-callback
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{(strace)} {(DQ ($ Id.VSub_At '$@'))}]
                  redirects: [(redir.Redir op:<Id.Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})]
                )
                (C {(wc)} {(-l)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: time-callback
      body: 
        (command.BraceGroup
          children: [
            (command.TimeBlock
              pipeline: 
                (command.Simple
                  words: [{(DQ ($ Id.VSub_At '$@'))}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{(/dev/null)})]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: compare
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} 
              {(Id.Lit_VarLike 'callback=') 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(strace-callback)})
                )
              }
            )
            (command.ForEach
              iter_name: sh
              iter_words: [{(bash)} {(dash)} {(mksh)} {(zsh)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} {($ Id.VSub_DollarName '$sh')})
                    (C {($ Id.VSub_DollarName '$callback')} {($ Id.VSub_DollarName '$sh')} {(-c)} 
                      {(SQ <'echo "hi" > /dev/null'>)}
                    )
                    (C {(echo)})
                  ]
                )
            )
            (command.ForEach
              iter_name: awk
              iter_words: [{(gawk)} {(mawk)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} {($ Id.VSub_DollarName '$awk')})
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$callback')}
                        {($ Id.VSub_DollarName '$awk')}
                        {(SQ <'{ print "hi" } '>)}
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{(/dev/null)})]
                    )
                    (C {(echo)})
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(command.Sentence child:(C {(which)} {(lua)}) terminator:<Id.Op_Semi ';'>)]
                  action: [
                    (C {(echo)} {(lua)})
                    (C {($ Id.VSub_DollarName '$callback')} {(lua)} {(-e)} {(SQ <'print "hi"'>)})
                    (C {(echo)})
                  ]
                  spids: [244 251]
                )
              ]
            )
            (C {(echo)} {(perl)})
            (C {($ Id.VSub_DollarName '$callback')} {(perl)} {(-e)} {(SQ <'print "hi\\n"'>)})
            (C {(echo)})
            (command.If
              arms: [
                (if_arm
                  cond: [(command.Sentence child:(C {(which)} {(ruby)}) terminator:<Id.Op_Semi ';'>)]
                  action: [
                    (C {(echo)} {(ruby)})
                    (C {($ Id.VSub_DollarName '$callback')} {(ruby)} {(-e)} {(SQ <'print "hi\\n"'>)})
                    (C {(echo)})
                  ]
                  spids: [301 308]
                )
              ]
            )
            (command.ForEach
              iter_name: py
              iter_words: [{(python)} {(python3)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} {($ Id.VSub_DollarName '$py')} {(-S)})
                    (C {($ Id.VSub_DollarName '$callback')} {($ Id.VSub_DollarName '$py')} {(-S)} {(-c)} 
                      {(SQ <'print("hi")'>)}
                    )
                    (C {(echo)})
                  ]
                )
            )
            (command.ForEach
              iter_name: py
              iter_words: [{(python)} {(python3)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} {($ Id.VSub_DollarName '$py')} {(import)})
                    (C {($ Id.VSub_DollarName '$callback')} {($ Id.VSub_DollarName '$py')} {(-S)} {(-c)} 
                      {(SQ <'import json;print("hi")'>)}
                    )
                    (C {(echo)})
                  ]
                )
            )
            (command.ForEach
              iter_name: py
              iter_words: [{(python)} {(python3)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} {($ Id.VSub_DollarName '$py')} {(import)})
                    (C {($ Id.VSub_DollarName '$callback')} {($ Id.VSub_DollarName '$py')} {(-S)} {(-c)} 
                      {(SQ <'import json;print("hi")'>)}
                    )
                    (C {(echo)})
                  ]
                )
            )
            (C {(echo)} {(SQ <'Small app.zip'>)})
            (C {($ Id.VSub_DollarName '$callback')} {(python)} {(-S)} {(_tmp/app.zip)})
            (C {(echo)})
            (C {(echo)} {(SQ <'hello app bundle'>)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [(C {($ Id.VSub_DollarName '$callback')} {(_bin/hello.ovm)}) (C {(true)})]
            )
            (C {(echo)})
            (C {(echo)} {(SQ <'OSH app bundle true'>)})
            (C {($ Id.VSub_DollarName '$callback')} {(_bin/true)})
            (C {(echo)})
            (C {(echo)} {(SQ <'OSH app bundle Hello World'>)})
            (C {($ Id.VSub_DollarName '$callback')} {(_bin/osh)} {(-c)} {(SQ <'echo hi'>)})
            (C {(echo)})
          ]
        )
    )
    (command.ShFunction
      name: compare-strace
      body: (command.BraceGroup children:[(C {(compare)} {(strace-callback)})])
    )
    (command.ShFunction
      name: compare-time
      body: (command.BraceGroup children:[(C {(compare)} {(time-callback)})])
    )
    (command.ShFunction
      name: import-stats
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} {(json)})
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{(strace)} {(python)} {(-c)} {(SQ <'import json'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})]
                )
                (C {(grep)} {(json)})
                (C {(wc)} {(-l)})
              ]
              negated: F
            )
            (C {(echo)} {(nonexistent___)})
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{(strace)} {(python)} {(-c)} {(SQ <'import nonexistent___'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})]
                )
                (C {(grep)} {(nonexistent___)})
                (C {(wc)} {(-l)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: make-zip
      body: 
        (command.BraceGroup
          children: [
            (C {(rm)} {(-r)} {(-f)} {(_tmp/app)})
            (C {(rm)} {(-f)} {(_tmp/app.zip)})
            (C {(mkdir)} {(-p)} {(_tmp/app)})
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {(_tmp/app/lib1.py)}
                )
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  here_begin: {(EOF)}
                  here_end_span_id: 695
                  stdin_parts: [
                    ('print ')
                    (Id.Right_DoubleQuote '"')
                    ('hi from lib1')
                    (Id.Right_DoubleQuote '"')
                    ('\n')
                  ]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {(_tmp/app/lib2.py)}
                )
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  here_begin: {(EOF)}
                  here_end_span_id: 713
                  stdin_parts: [
                    ('print ')
                    (Id.Right_DoubleQuote '"')
                    ('hi from lib2')
                    (Id.Right_DoubleQuote '"')
                    ('\n')
                  ]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {(_tmp/app/__main__.py)}
                )
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  here_begin: {(EOF)}
                  here_end_span_id: 735
                  stdin_parts: [
                    ('import sys\n')
                    ('sys.path = [sys.argv[0]]\n')
                    ('import lib1\n')
                    ('import lib2\n')
                    ('print ')
                    (Id.Right_DoubleQuote '"')
                    ('hi from zip')
                    (Id.Right_DoubleQuote '"')
                    ('\n')
                  ]
                )
              ]
            )
            (C {(pushd)} {(_tmp/app)})
            (C {(zip)} {(-r)} {(../app.zip)} {(.)})
            (C {(popd)})
          ]
        )
    )
    (command.ShFunction
      name: test-zip
      body: (command.BraceGroup children:[(C {(python)} {(-S)} {(_tmp/app.zip)})])
    )
    (command.ShFunction
      name: strace-zip
      body: (command.BraceGroup children:[(C {(strace)} {(python)} {(-S)} {(_tmp/app.zip)})])
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)