Create a function to find the maximum perfect subtree within a given binary tree. Represent the tree as a level-order list, using None for missing nodes, and return the maximum number of nodes in any perfect subtree. A perfect subtree has two children at every internal node and all leaves at the same depth. For example, [1, 2, 3, 4, 5, 6, 7] returns 7, while [1, 2, 3, 4, 5, 6, None] returns 3.
def max_perfect_subtree(tree):