(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git apply handling submodules'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-submodule-update.sh'>})
    (command.ShFunction
      name: apply_index
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<git>} {<diff>} {<--ignore-submodules> <Id.Lit_Equals '='> <dirty>} 
                  {(DQ <..> ($ Id.VSub_Number '$1'))}
                )
                (C {<git>} {<apply>} {<--index>} {<->})
              ]
              negated: F
            )
          ]
        )
    )
    (C {<test_submodule_switch>} {(DQ <apply_index>)})
    (command.ShFunction
      name: apply_3way
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<git>} {<diff>} {<--ignore-submodules> <Id.Lit_Equals '='> <dirty>} 
                  {(DQ <..> ($ Id.VSub_Number '$1'))}
                )
                (C {<git>} {<apply>} {<--3way>} {<->})
              ]
              negated: F
            )
          ]
        )
    )
    (C {<test_submodule_switch>} {(DQ <apply_3way>)})
    (C {<test_done>})
  ]
)