def make_things_v2_file(sensors):
    """Creates and returns the contents of a file that can be used to Copy and Past values
    into the fields used for setting up a Things Network version 2 device.
    """
    contents = ''
    app_euis = set()

    for s in sensors:
        dev_id = f"{s['model']}-{s['bldg_abbrev']}-{s['dev_eui'][-4:]}"
        dev_id = dev_id.replace('_', '-').replace(' ', '-').lower()
        contents += f"Device ID:  {dev_id}\n"
        contents += f"Device EUI:  {s['dev_eui']}\n"
        contents += f"App Key:  {s['app_key']}\n"
        contents += f"Select this App EUI:  {s['app_eui']}\n"
        contents += f"{s['name']}\n\n"

        app_euis.add(s['app_eui'])

    contents = 'Prior to adding devices, make sure the following App EUIs are added to the Application:\n' + \
        '\n'.join(list(app_euis)) + '\n\n' + contents
    
    return contents