(command.CommandList
  children: [
    (command.ShFunction
      name: is-shell
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'path='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<shebang>})
            (command.Simple
              words: [{<read>} {<shebang>}]
              redirects: [
                (redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {($ Id.VSub_DollarName '$path')}
                )
              ]
              do_fork: T
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:shebang)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name shebang>
                        suffix_op: 
                          (suffix_op.PatSub
                            pat: {<' '>}
                            replace: {}
                            replace_mode: Id.Lit_Slash
                          )
                      )
                    }
                  spids: [46]
                )
              ]
            )
            (command.DBracket
              expr: 
                (bool_expr.Binary
                  op_id: Id.BoolBinary_GlobDEqual
                  left: {($ Id.VSub_DollarName '$shebang')}
                  right: {<Id.Lit_Other '*'> <sh>}
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: unittest
      body: 
        (BraceGroup
          children: [
            (command.ForEach
              iter_name: file
              iter_words: [{<'bin/oil.py'>} {<configure>} {<install>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: (C {<is-shell>} {($ Id.VSub_DollarName '$file')})
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<echo>} {<YES>} {($ Id.VSub_DollarName '$file')})]
                          spids: [96 103]
                        )
                      ]
                      else_action: [(C {<echo>} {<NO>} {($ Id.VSub_DollarName '$file')})]
                    )
                  ]
                )
            )
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)