function replaceMarkoDebug(path, test, consequent, alternate) {
  // Reverse replacement when negating the expression.
  if (test.type === "UnaryExpression" && test.operator === "!") {
    const temp = consequent;
    consequent = alternate;
    alternate = temp;
    test = test.argument;
  }

  // Only look for "MARKO_DEBUG" strings.
  if (test.type !== "StringLiteral") {
    return;
  }

  // If we found a condition that is a string (and isn't "MARKO_DEBUG") it's most likely a mistake.
  if (test.value !== "MARKO_DEBUG") {
    throw new Error(
      `Found if statement with StringLiteral "${test.value}", did you mean "MARKO_DEBUG".`,
    );
  }

  if (alternate) {
    if (alternate.type === "BlockStatement") {
      path.replaceWithMultiple(alternate.body);
    } else {
      path.replaceWith(alternate);
    }
  } else {
    if (path.parentPath.node.type === "VariableDeclarator") {
      path.parentPath.remove();
    } else {
      path.remove();
    }
  }
}
Replaces any conditions containing "MARKO_DEBUG" or !"MARKO_DEBUG" and collapses them.