def ro_rw_to_binds(ro, rw):
out = {}<EOL>if ro:<EOL><INDENT>for localdir, binddir in ro.iteritems():<EOL><INDENT>out[localdir] = {'<STR_LIT>': binddir, '<STR_LIT>': True}<EOL><DEDENT><DEDENT>if rw:<EOL><INDENT>for localdir, binddir in rw.iteritems():<EOL><INDENT>out[localdir] = {'<STR_LIT>': binddir, '<STR_LIT>': False}<EOL><DEDENT><DEDENT>return out<EOL>
ro and rw {localdir: binddir} dicts to docker-py's
{localdir: {'bind': binddir, 'ro': T/F}} binds dicts