Compare `len(fw_derivatives)` with 0 w/o using `not` (#97953)
`fw_derivatives` is a list as in the permlink so we can make use of the fact that the empty list is evaluated as `False` but from I prefer `len(some_list) > 0` thanks to its clarity and implication that the variable is a container.
https://github.com/pytorch/pytorch/blob/53c9bc8c68f05fee2421ef00c2f852f4cd322693/tools/autograd/gen_variable_type.py#L942
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97953
Approved by: https://github.com/soulitzer