Removed unused function

This commit removes an unused function. I was going to make it part of the other flake8 cleanup pull request but this may be around for a reason, hence a separate PR.