STY: make function_base.py pep8 compatible

This makes function_base.py almost pep8 compatible.
ALSO, removes the Set import which is unneeded since python 2.4,
and organises the import statements.