def deregulate(layout):
    if (not is_fully_regular(layout)):
        return layout
    else:
        shape = [len(layout)]
        node = layout
        while isinstance(node, ak.layout.RegularArray):
            shape.append(node.size)
            node = node.content
        nparray = ak.nplike.of(node).asarray(node)
        nparray = nparray.reshape((tuple(shape) + nparray.shape[1:]))
        return ak.layout.NumpyArray(nparray, node.identities, node.parameters)
def deregulate(layout):
    if (not is_fully_regular(layout)):
        return layout
    else:
        shape = [len(layout)]
        node = layout
        while isinstance(node, ak.layout.RegularArray):
            shape.append(node.size)
            node = node.content
        nparray = ak.nplike.of(node).asarray(node)
        nparray = nparray.reshape((tuple(shape) + nparray.shape[1:]))
        return ak.layout.NumpyArray(nparray, node.identities, node.parameters)