Finds a generator as a statement

def find_generator_as_statement(node):
    """Finds a generator as a statement"""
    return (
        isinstance(node, ast.Expr)
        and isinstance(node.value, ast.GeneratorExp)
    )