function transformMethodCallToFunctionCall(node, functionName) {
  // `__at(isOptionalObject, object, ...arguments)`
  node.arguments.unshift(
    {
      type: "BooleanLiteral",
      value: node.callee.type === "OptionalMemberExpression",
      leadingComments: [{ type: "CommentBlock", value: " isOptionalObject " }],
    },
    node.callee.object,
  );

  node.callee = { type: "Identifier", name: functionName };
}
`foo.at(index)` -> `__at(false, foo, index)`
`foo?.at(index)` -> `__at(true, foo, index)`

@param {import("@babel/types").CallExpression | import("@babel/types").OptionalCallExpression} node
@returns {import("@babel/types").CallExpression}