docs: def flatten_to_documents(model, include_pointers=False):
      """Flatten the model to a list of documents (aka ``Document`` objects).
      This is to flatten a ``Binder``'ish model down to a list of documents.
      If ``include_pointers`` has been set to ``True``, ``DocumentPointers``
      will also be included in the results.
  
      """
      types = [Document]
      if include_pointers:
          types.append(DocumentPointer)
      types = tuple(types)
  
      def _filter(m):
          return isinstance(m, types)
  
      return flatten_to(model, _filter)