def req_cycle(req):
cls = req.__class__<EOL>seen = {req.name}<EOL>while isinstance(req.comes_from, cls):<EOL><INDENT>req = req.comes_from<EOL>if req.name in seen:<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>seen.add(req.name)<EOL><DEDENT><DEDENT>return False<EOL>
is this requirement cyclic?