async def print_what_is_playing(loop):
print('<STR_LIT>')<EOL>atvs = await pyatv.scan_for_apple_tvs(loop, timeout=<NUM_LIT:5>)<EOL>if not atvs:<EOL><INDENT>print('<STR_LIT>', file=sys.stderr)<EOL>return<EOL><DEDENT>print('<STR_LIT>'.format(atvs[<NUM_LIT:0>].address))<EOL>atv = pyatv.connect_to_apple_tv(atvs[<NUM_LIT:0>], loop)<EOL>try:<EOL><INDENT>playing = await atv.metadata.playing()<EOL>print('<STR_LIT>')<EOL>print(playing)<EOL><DEDENT>finally:<EOL><INDENT>await atv.logout()<EOL><DEDENT>
Find a device and print what is playing.