def METHOD_NAME(self, context):
    o = self.id_data
    age = context.scene.world.plasma_age
    # We want to encourage the pages = layers paradigm.
    # So, let's see which layers we're on and check for a page whose
    #    suffix matches our layers. We'll take the first match.
    num_layers = len(o.layers)
    for page in age.pages:
        if page.seq_suffix > num_layers:
            continue
        if page.page_type == "external":
            continue
        if o.layers[page.seq_suffix - 1]:
            o.plasma_object.page = page.name
            break