code: def _preprocess_add_items(self, items):
          
          paths = []
          entries = []
  
          for item in items:
              if isinstance(item, string_types):
                  paths.append(self._to_relative_path(item))
              elif isinstance(item, (Blob, Submodule)):
                  entries.append(BaseIndexEntry.from_blob(item))
              elif isinstance(item, BaseIndexEntry):
                  entries.append(item)
              else:
                  raise TypeError("Invalid Type: %r" % item)
          # END for each item
          return (paths, entries)
docs: Split the items into two lists of path strings and BaseEntries.