human
I wrote the below code

    def _ip_decider(vm, ips):
        for ip in ips:
            if (ip in preferred):
                return ip
        return False
    return _ip_decider

What's a good function header?
assistant
#Here's a good function header.

def _preferred_ip(ip_set, preferred=None):