Remove duplicated code in helper.py
Remove duplicated code in helper.py

1. What is the problem?
We have some duplicated code in helper.py

2. What is the solution to the problem?
Remove the duplicated code

3. What features need to be implemented to the Tricircle to realize
the solution?
N/A

Change-Id: I5dc8a09cbaac55d35605ea0f960ec6f362482c71
Closes-Bug: #1733795

openstack/tricircle,stackforge/tricircle,stackforge/tricircle,openstack/tricircle