fixed PEP8 violations and added import for warnings module that was being used with no import
fixed PEP8 violations
fixed PEP8 violations