Just because petsc4py is installed on a system doesn't mean the function is being executed in parallel.  But I can't find a situation in which this actually breaks something.  Do you think it is harmless?