import re


def cpp_rename_in(lines):
  """Renames an IN symbol to IN_.

  If a proto uses a enum member named 'IN', protobuf happily uses that in the
  message definition. This conflicts with the IN parameter annotation macro in
  windows.h.

  Args:
    lines: The lines to fix.

  Returns:
    The lines, fixed.
  """
  in_macro = re.compile(r'\bIN\b')
  return [in_macro.sub('IN_', line) for line in lines]