How to parse curly braces ({}) from a Pebble string?

I want to make a string variable that contains curly braces as it has nested PAPI variables but pebble is taking some of the braces out.

Here's what I'm trying to parse:
randomYamlKey: |-
  &4&m+                                       +
  {% set req = 'placeholder#math_0:0_{statistic_mine_block:COAL_ORE}+{statistic_mine_block:DEEPSLATE_COAL_ORE}' %}
  ...then I would do things with this variable if it worked
  &4&m+                                       +

When I use the string as a variable elsewhere it is parsed as placeholder#math_0:0_statistic_mine_block:COAL_ORE}+{statistic_mine_block:DEEPSLATE_COAL_ORE} missing the first
{
. I tried escaping the curly braces by using two instead of one but then I get the error: [18:39:46 WARN]: com.mitchellbosecke.pebble.error.ParserException: Unexpected character [&] for some reason. Maybe because pebble for some reason html encodes the curly brace?

I've been trying for a long time now and would really appreciate guidance. Thanks in advance.
Was this page helpful?