code: def find_template_filename(self, template_name):
          
  
          def next_file():
              filename = self.path / template_name
              yield filename
              try:
                  exts = self.default_file_extensions
              except AttributeError:
                  return
  
              strfilename = str(filename)
              for ext in exts:
                  yield Path(strfilename + ext)
  
          for filename in next_file():
              if filename.is_file():
                  return filename
docs: Searches for a file matching the given template name.
  
          If found, this method returns the pathlib.Path object of the found
          template file.
  
          Args:
              template_name (str): Name of the template, with or without a file
                  extension.
  
          Returns:
              pathlib.Path: Path to the matching filename.