def METHOD_NAME(v, N=None):
    """Check if `v` is iterable with optional size `N`.
    Examples
    --------
    >>> import pygimli as pg
    >>> import numpy as np
    >>> print(pg.isIterable([0, 1]))
    True
    >>> print(pg.isIterable([pg.Vector(5), pg.Vector(2)], N=2))
    True
    """
    if N is None:
        return hasattr(v, '__iter__')
    return METHOD_NAME(v) and len(v) == N