Mechanic operating high reach lifted basket to back out of the tight area. The other mechanic in the basket was in the process of checking top side of pipe when EE became pinned between top rail of basket and I-beam structure. (As a result of the basket impact, the man lift could not be operated from the basket, requiring a nearby employee to operate the basket from the ground.)