def find_window_for_buffer_name(cli, buffer_name):
 from prompt_toolkit.interface import CommandLineInterface
 assert isinstance(cli, CommandLineInterface)
 from .containers import Window
 from .controls import BufferControl
 for l in cli.layout.walk(cli):
  if (isinstance(l, Window) and isinstance(l.content, BufferControl)):
   if (l.content.buffer_name == buffer_name):
    return l

def find_window_for_buffer_name ( cli , buffer_name ) : from prompt_toolkit . interface import CommandLineInterface assert isinstance ( cli , CommandLineInterface ) from . containers import Window from . controls import BufferControl for l in cli . layout . walk ( cli ) : if ( isinstance ( l , Window ) and isinstance ( l . content , BufferControl ) ) : if ( l . content . buffer_name == buffer_name ) : return l
look for a :class:~prompt_toolkit .