Make kwargs argument optional in _batched_grad_test (#47625)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47625
kwargs is {} most of the time so this PR makes it optional. Note that it
is bad practice for {} to be a default argument; we work around this by
using None as the default and handling it accordingly.
Test Plan
- `pytest test/test_vmap.py -v`
Test Plan: Imported from OSS
Reviewed By: Chillee
Differential Revision: D24842571
Pulled By: zou3519
fbshipit-source-id: a46b0c6d5240addbe3b231b8268cdc67708fa9e0