Iter on a graph to finds object connected

        :param graph: Graph to serialize
        :type graph: Graph
        :param target: Node to iterate over
        :type target: Node
        :param ascendants: Number of level to iter over upwards (-1 = No Limit)
        :param descendants: Number of level to iter over downwards (-1 = No limit)
        :return:

def graphiter(self, graph, target, ascendants=0, descendants=1):
        """ Iter on a graph to finds object connected

        :param graph: Graph to serialize
        :type graph: Graph
        :param target: Node to iterate over
        :type target: Node
        :param ascendants: Number of level to iter over upwards (-1 = No Limit)
        :param descendants: Number of level to iter over downwards (-1 = No limit)
        :return:
        """

        asc = 0 + ascendants
        if asc != 0:
            asc -= 1

        desc = 0 + descendants
        if desc != 0:
            desc -= 1

        t = str(target)

        if descendants != 0 and self.downwards[t] is True:
            self.downwards[t] = False
            for pred, obj in graph.predicate_objects(target):
                if desc == 0 and isinstance(obj, BNode):
                    continue
                self.add((target, pred, obj))

                # Retrieve triples about the object
                if desc != 0 and self.downwards[str(obj)] is True:
                    self.graphiter(graph, target=obj, ascendants=0, descendants=desc)

        if ascendants != 0 and self.updwards[t] is True:
            self.updwards[t] = False
            for s, p in graph.subject_predicates(object=target):
                if desc == 0 and isinstance(s, BNode):
                    continue
                self.add((s, p, target))

                # Retrieve triples about the parent as object
                if asc != 0 and self.updwards[str(s)] is True:
                    self.graphiter(graph, target=s, ascendants=asc, descendants=0)