def networks(self, role="<STR_LIT:all>", full="<STR_LIT:all>"):
if full not in ["<STR_LIT:all>", True, False]:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(full)<EOL>)<EOL><DEDENT>if full == "<STR_LIT:all>":<EOL><INDENT>if role == "<STR_LIT:all>":<EOL><INDENT>return Network.query.all()<EOL><DEDENT>else:<EOL><INDENT>return Network.query.filter_by(role=role).all()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if role == "<STR_LIT:all>":<EOL><INDENT>return Network.query.filter_by(full=full).all()<EOL><DEDENT>else:<EOL><INDENT>return Network.query.filter(<EOL>and_(Network.role == role, Network.full == full)<EOL>).all()<EOL><DEDENT><DEDENT>
All the networks in the experiment.