Complete the function/method (depending on the language) to return `true`/`True` when its argument is an array that has the same nesting structures and same corresponding length of nested arrays as the first array.
For example:
```python
# should return True
same_structure_as([ 1, 1, 1 ], [ 2, 2, 2 ] )
same_structure_as([ 1, [ 1, 1 ] ], [ 2, [ 2, 2 ] ] )
# should return False 
same_structure_as([ 1, [ 1, 1 ] ], [ [ 2, 2 ], 2 ] )
same_structure_as([ 1, [ 1, 1 ] ], [ [ 2 ], 2 ] )
# should return True
same_structure_as([ [ [ ], [ ] ] ], [ [ [ ], [ ] ] ] )
# should return False
same_structure_as([ [ [ ], [ ] ] ], [ [ 1, 1 ] ] )
```
~~~if:javascript
For your convenience, there is already a function 'isArray(o)' declared and defined that returns true if its argument is an array, false otherwise.
~~~
~~~if:php
You may assume that all arrays passed in will be non-associative.
~~~
def islist(A):
    return isinstance(A, list)
def same_structure_as(original,other):
    if islist(original) != islist(other):
        return False
    elif islist(original):
        if len(original) != len(other):
            return False
        for i in range(len(original)):
            if not same_structure_as(original[i], other[i]):
                return False
        return True
    else:
        return True
def islist(A):
    return isinstance(A, list)
def same_structure_as(original,other):
    if islist(original) != islist(other):
        return False
    elif islist(original):
        if len(original) != len(other):
            return False
        for i in range(len(original)):
            if not same_structure_as(original[i], other[i]):
                return False
        return True
    else:
        return True