def iface_definition(iface, ssid, psk):
    """Returns the corresponding iface definition as a string,
    formatted for inclusion in /etc/network/interfaces.d/"""
    return \
"""iface {} inet dhcp
      wpa-ssid "{}"
      wpa-psk {}

""".format(iface, ssid, psk)