def _ip_for_mac_from_ip_addr_show(ip_addr_show, target_mac):
return_next_ip = False<EOL>for line in ip_addr_show.splitlines():<EOL><INDENT>line = line.strip()<EOL>if line.startswith('<STR_LIT>'):<EOL><INDENT>line_mac = line.split('<STR_LIT:U+0020>')[<NUM_LIT:1>].replace('<STR_LIT::>', '<STR_LIT>')<EOL>if line_mac == target_mac:<EOL><INDENT>return_next_ip = True<EOL><DEDENT><DEDENT>elif return_next_ip and line.startswith('<STR_LIT>') and not line.startswith('<STR_LIT>'):<EOL><INDENT>ip = line.split('<STR_LIT:U+0020>')[<NUM_LIT:1>].split('<STR_LIT:/>')[<NUM_LIT:0>]<EOL>return ip<EOL><DEDENT><DEDENT>
Given the rather-complex output from an 'ip addr show' command
    on the VM, parse the output to determine the IP address
    assigned to the interface with the given MAC.