def _create_folder(self, title, folder_or_uri=None):
        try:
            return gdata.docs.service.DocsService.CreateFolder(self, title,
                                                               folder_or_uri)
        except AttributeError:
            import atom
            if folder_or_uri:
                try:
                    uri = folder_or_uri.content.src
                except AttributeError:
                    uri = folder_or_uri
            else:
                uri = '/feeds/documents/private/full'

            folder_entry = gdata.docs.DocumentListEntry()
            folder_entry.title = atom.Title(text=title)
            folder_entry.category.append(_make_kind_category(
                googlecl.docs.FOLDER_LABEL))
            folder_entry = self.Post(folder_entry, uri,
                                     converter=gdata.docs.DocumentListEntryFromString)
            return folder_entry
Stolen from gdata-2.0.10 to make recursive directory upload work.
dataset/ETHPy150Open vinitkumar/googlecl/src/googlecl/docs/service.py/DocsServiceCL._create_folder