class_docstr: The layout for a prompt_toolkit
  :class:`~prompt_toolkit.application.Application`.
  This also keeps track of which user control is focused.
  
  :param container: The "root" container for the layout.
  :param focused_element: element to be focused initially. (Can be anything
      the `focus` function accepts.)
class_docstr_tok: ["The","layout","for","a","prompt_toolkit",":","class",":","`","~prompt_toolkit.application.Application","`",".","This","also","keeps","track","of","which","user","control","is","focused",".",":","param","container",":","The","``","root","''","container","for","the","layout",".",":","param","focused_element",":","element","to","be","focused","initially",".","(","Can","be","anything","the","`","focus","`","function","accepts",".",")"]
docstr: Look in the layout for a buffer with the given name.
  Return `None` when nothing was found.
docstr_tok: ["Look","in","the","layout","for","a","buffer","with","the","given","name",".","Return","`","None","`","when","nothing","was","found","."]
code: def get_buffer_by_name(self, buffer_name: str) -> Buffer | None:
      """
      Look in the layout for a buffer with the given name.
      Return `None` when nothing was found.
      """
      for w in self.walk():
          if isinstance(w, Window) and isinstance(
              w.content, BufferControl
          ):
              if w.content.buffer.name == buffer_name:
                  return w.content.buffer
      return None
  
imports: from __future__ import annotations
  from typing import Generator, Iterable, Union
  from prompt_toolkit.buffer import Buffer
  from .containers import AnyContainer, ConditionalContainer, Container, Window, to_container
  from .controls import BufferControl, SearchBufferControl, UIControl
label_desc: Use image node_id 16 for calling the Layout obj's underlying member method code with example usage: obj.get_buffer_by_name(buffer_name) and returns: None, w