What is the most pythonic form to define two ways of iterating. In example, I have this original code:

```
def f1(cat_gen):
    for (a, b), c in cat_gen:
        if some condition:
            yield (a, b), c

```

**but**, depending on `cat_gen` I would need to iterate in this way:

```
def f1(cat_gen):
    for a, b, c in cat_gen:
        if some condition:
            yield a, b, c

```

Is there a way to change conditionally just `(a, b), c` to `a, b, c` in the `for` statement