def WrapMethodInClass(text: str) -> str:
  """A preprocessor which wraps a method into a class definition.

  Args:
    text: Method to wrap in a class.

  Returns:
    A class definition.
  """
  return f"""\
public class A {{
{text}
}}
"""