human
Solve in Python:
A Madhav array has the following property:

```a[0] = a[1] + a[2] = a[3] + a[4] + a[5] = a[6] + a[7] + a[8] + a[9] = ...```

Complete the function/method that returns `true` if the given array is a Madhav array, otherwise it returns `false`.

*Edge cases: An array of length* `0` *or* `1` *should not be considered a Madhav array as there is nothing to compare.*
assistant
#Here is the Python code you requested.

def is_madhav_array(arr):
    def check(a, n=1):
        return True if len(a) == n else sum(a[:n]) == sum(a[n:2*n+1]) and check(a[n:], n + 1)
    return False if len(arr) <= 1 else check(arr)