refactor: extract helper
refactor: extract helper

weaveworks/scope,kinvolk/scope,weaveworks/scope,alban/scope,weaveworks/scope,kinvolk/scope,alban/scope,alban/scope,kinvolk/scope,kinvolk/scope,kinvolk/scope,weaveworks/scope,alban/scope,weaveworks/scope,alban/scope,kinvolk/scope,alban/scope,weaveworks/scope