Stage an import from a file upload.

        :param fd: File-like object to upload.
        :param filename: (optional) Filename to use for import as string.
        :return: :class:`imports.Import <imports.Import>` object

def stage_import_from_file(self, fd, filename='upload.gz'):
        """Stage an import from a file upload.

        :param fd: File-like object to upload.
        :param filename: (optional) Filename to use for import as string.
        :return: :class:`imports.Import <imports.Import>` object
        """
        schema = ImportSchema()
        resp = self.service.post(self.base,
                                 files={'file': (filename, fd)})
        return self.service.decode(schema, resp)