def catch_length(x):
    """Return x if len(x) > 1, raise error else."""
    if len(x) < 2:
        raise ValueError('Array must contains at least two elements, got {}'
            .format(x))
    return x
