<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def download_SRA(self, email, directory='series', filterby=None, nproc=1, **kwargs):
 """Download SRA files for each GSM in series. .. warning:: Do not use parallel option (nproc > 1) in the interactive shell. For more details see `this issue <https://stackoverflow.com/questions/23641475/multiprocessing-working-in-python-but-not-in-ipython/23641560#23641560>`_ on SO. Args: email (:obj:`str`):
 E-mail that will be provided to the Entrez. directory (:obj:`str`, optional):
 Directory to save the data (defaults to the 'series' which saves the data to the directory with the name of the series + '_SRA' ending). Defaults to "series". filterby (:obj:`str`, optional):
 Filter GSM objects, argument is a function that operates on GSM object and return bool eg. lambda x: "brain" not in x.name. Defaults to None. nproc (:obj:`int`, optional):
 Number of processes for SRA download (default is 1, no parallelization). **kwargs: Any arbitrary argument passed to GSM.download_SRA method. See the documentation for more details. Returns: :obj:`dict`: A dictionary containing output of ``GSM.download_SRA`` method where each GSM accession ID is the key for the output. """

        if directory == 'series':
            dirpath = os.path.abspath(self.get_accession() + "_SRA")
            utils.mkdir_p(dirpath)
        else:
            dirpath = os.path.abspath(directory)
            utils.mkdir_p(dirpath)
        if filterby is not None:
            gsms_to_use = [gsm for gsm in self.gsms.values() if filterby(gsm)]
        else:
            gsms_to_use = self.gsms.values()

        if nproc == 1:
            # No need to parallelize, running ordinary download in loop
            downloaded_paths = dict()
            for gsm in gsms_to_use:
                logger.info(
                    "Downloading SRA files for %s series\n" % gsm.name)
                downloaded_paths[gsm.name] = gsm.download_SRA(
                    email=email,
                    directory=dirpath,
                    **kwargs)
        elif nproc > 1:
            # Parallelization enabled
            downloaders = list()
            # Collecting params for Pool.map in a loop
            for gsm in gsms_to_use:
                downloaders.append([
                    gsm,
                    email,
                    dirpath,
                    kwargs])

            p = Pool(nproc)
            results = p.map(_sra_download_worker, downloaders)
            downloaded_paths = dict(results)
        else:
            raise ValueError("Nproc should be non-negative: %s" % str(nproc))

        return downloaded_paths