def is_matrix(block):
    """
        Returns true if block is a matrix.
    
        A matrix must be a Python list of lists where each list has length
        greater than 1 and all lists must be same length
    """
    
    return (all([isinstance(r,list) for r in block]) and all([len(block[0])==len(r) for r in block]))