<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_is_pallets_theme(app):
 """Set the ``is_pallets_theme`` config to ``True`` if the current theme is a decedent of the ``pocoo`` theme. """

    if app.config.is_pallets_theme is not None:
        return

    theme = getattr(app.builder, "theme", None)

    while theme is not None:
        if theme.name == "pocoo":
            app.config.is_pallets_theme = True
            break

        theme = theme.base
    else:
        app.config.is_pallets_theme = False