def sanitize_char(c):
    """Optionally normalize chars we don't want in log messages."""
    # Don't like having too many newlines in your debugging log output?
    # Change this.
    remove_newlines = False
    if c == "\r":
      if remove_newlines:
        return " "
      return "\r"
    if c == "\n":
      if remove_newlines:
        return " "
      return "\n"
    return c
Optionally normalize chars we don't want in log messages.
language/canine/tydiqa/debug.py