code: def flatten_template_loaders(templates):
      
      for loader in templates:
          if not isinstance(loader, string_types):
              for subloader in flatten_template_loaders(loader):
                  yield subloader
          else:
              yield loader
docs: Given a collection of template loaders, unwrap them into one flat iterable.
  
      :param templates: template loaders to unwrap
      :return: template loaders as an iterable of strings.
      :rtype: generator expression