[DataPipe] Improve Mapper to accept input/output index when apply fn (#64951)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64951
Test Plan: Imported from OSS
Reviewed By: VitalyFedyunin
Differential Revision: D30910035
Pulled By: ejguan
fbshipit-source-id: d687fe10939920a3617a60552fe743e8526438a0