def _transmit_doc(self, path, entry_title, post_uri, content_type, file_ext):
        media = gdata.MediaSource(file_path=path, content_type=content_type)
        try:
            # Upload() wasn't added until later versions of DocsService, so
            # we may not have it.
            return self.Upload(media, entry_title, post_uri)
        except AttributeError:
            import atom
            entry = gdata.docs.DocumentListEntry()
            entry.title = atom.Title(text=entry_title)
            # Cover the supported filetypes in gdata-2.0.10 even though
            # they aren't listed in gdata 1.2.4... see what happens.
            if file_ext.lower() in ['csv', 'tsv', 'tab', 'ods', 'xls', 'xlsx']:
                category = _make_kind_category(googlecl.docs.SPREADSHEET_LABEL)
            elif file_ext.lower() in ['ppt', 'pps']:
                category = _make_kind_category(
                    googlecl.docs.PRESENTATION_LABEL)
            elif file_ext.lower() in ['pdf']:
                category = _make_kind_category(googlecl.docs.PDF_LABEL)
            # Treat everything else as a document
            else:
                category = _make_kind_category(googlecl.docs.DOCUMENT_LABEL)
            entry.category.append(category)
            # To support uploading to folders for earlier
            # versions of the API, expose the lower-level Post
            return self.Post(entry, post_uri, media_source=media,
                             extra_headers={'Slug': media.file_name},
                             converter=gdata.docs.DocumentListEntryFromString)
Construct a grid for the given image.
dataset/ETHPy150Open vinitkumar/googlecl/src/googlecl/docs/service.py/DocsServiceCL._transmit_doc--crossover with--dataset/ETHPy150Open ardekantur/pyglet/pyglet/image/__init__.py/ImageGrid.__init__