

def _prepare_render_sources(runs, dirname):
    ' Dump all non-null set runs into a directory for rendering.\n    '
    good_sources = set()
    for run in runs:
        filename = '{source_id}.json'.format(**run.__dict__)
        with open(join(dirname, filename), 'w+b') as file:
            content = b64decode(run.source_data)
            file.write(content)
        if (run.status is True):
            good_sources.add(filename)
    return good_sources

dataset/ETHPy150Open openaddresses/machine/openaddr/ci/__init__.py _prepare_render_sources/original