(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:saved)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$PWD'))}
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ )} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:dest)
                  op: Equal
                  rhs: {(word_part.TildeSubPart token:<Lit_TildeLike '~'>) (/.micropython/lib/)}
                )
              ]
            )
          ]
        )
      ]
      else_action: [
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:dest)
              op: Equal
              rhs: {(DQ ($ VSub_Number '$1'))}
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$TMPDIR'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(cd)} {(/tmp)})]
        )
      ]
      else_action: [(C {(cd)} {($ VSub_DollarName '$TMPDIR')})]
    )
    (C {(rm)} {(-rf)} {(micropython-upip-) (Lit_Other '*')})
    (C {(wget)} {(-nd)} {(-r)} {(-l1)} 
      {(https) (Lit_Other ':') (//pypi.python.org/pypi/micropython-upip/)} {(--accept-regex)} {(DQ ('.*pypi.python.org/packages/source/.*.gz'))} 
      {(--reject) (Lit_Other '=') (html)}
    )
    (C {(tar)} {(xfz)} {(micropython-upip-) (Lit_Other '*') (.tar.gz)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tmpd)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$PWD'))}
        )
      ]
    )
    (C {(cd)} {(DQ ($ VSub_DollarName '$saved'))})
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$dest'))})
    (C {(cp)} 
      {(DQ ($ VSub_DollarName '$tmpd')) (/micropython-upip-) (Lit_Other '*') (/upip) (Lit_Other '*') 
        (.py)
      } {(DQ ($ VSub_DollarName '$dest'))}
    )
    (C {(echo)} {(DQ ('upip is installed. To use:'))})
    (C {(echo)} {(DQ ('micropython -m upip --help'))})
  ]
)