def upload_bundle(self, sources, follow_symlinks, exclude_patterns, git, unpack, remove_sources, info, worksheet_uuid, add_to_worksheet):
        """
        See local_bundle_client.py for documentation on the usage.
        Strategy:
        1) We copy the |sources| to a temporary directory on the server
          (streaming either a tar or tar.gz depending on whether compression is
          needed).
        2) We politely ask the server to finish_upload_bundle (performs a
          LocalBundleClient.upload_bundle from the temporary directory).
        """
        # URLs can be directly passed to the local client.
        if all(path_util.path_is_url(source) for source in sources):
            return self.upload_bundle_url(sources, follow_symlinks, exclude_patterns, git, unpack, remove_sources, info, worksheet_uuid, add_to_worksheet)

        remote_file_uuids = []
        try:
            # 1) Copy sources up to the server (temporary remote zip file)
            for source in sources:
                if zip_util.path_is_archive(source):
                    source_handle = open(source)
                    temp_file_name = os.path.basename(source)
                elif os.path.isdir(source):
                    source_handle = tar_gzip_directory(source, follow_symlinks, exclude_patterns)
                    temp_file_name = os.path.basename(source) + '.tar.gz'
                    unpack = True  # We packed it, so we have to unpack it
                else:
                    resolved_source = source
                    if follow_symlinks:
                        resolved_source = os.path.realpath(source)
                        if not os.path.exists(resolved_source):
                            raise UsageError('Broken symlink')
                    elif os.path.islink(source):
                        raise UsageError('Not following symlinks.')
                    source_handle = gzip_file(resolved_source)
                    temp_file_name = os.path.basename(source) + '.gz'
                    unpack = True  # We packed it, so we have to unpack it

                remote_file_uuid = self.open_temp_file(temp_file_name)
                remote_file_uuids.append(remote_file_uuid)
                with closing(RPCFileHandle(remote_file_uuid, self.proxy)) as dest_handle:
                    status = (source, ' ('+info['uuid']+')' if 'uuid' in info else '', self.address) % 'Uploading %s%s to %s'
                    file_util.copy(source_handle, dest_handle, autoflush=False, print_status=status)

            # 2) Install upload (this call will be in charge of deleting the temporary file).
            return self.finish_upload_bundle(remote_file_uuids, unpack, info, worksheet_uuid, add_to_worksheet)
        except:
            for remote_file_uuid in remote_file_uuids:
                self.finalize_file(remote_file_uuid)
            raise
dataset/ETHPy150Open codalab/codalab-cli/codalab/client/remote_bundle_client.py/RemoteBundleClient.upload_bundle/swapped operands of `%`