Align current_flow_closeness.py with PEP-8 and remove some duplicate code

See #983 for more details.