async def METHOD_NAME(config, action_id, template_arg, args):
    paren = await cg.get_variable(config[CONF_ID])
    var = cg.new_Pvariable(action_id, template_arg, paren)
    template_ = await cg.templatable(config[CONF_INDEX], args, cg.size_t)
    cg.add(var.set_index(template_))
    return var