"Code for get_local_ip is refactored for more readability"