code: def _ensure_frames(cls, documents):
          
          frames = []
          for document in documents:
              if not isinstance(document, Frame):
                  frames.append(cls(document))
              else:
                  frames.append(document)
          return frames
docs: Ensure all items in a list are frames by converting those that aren't.