class_docstr: The opposide of ``raw_mode``, used when we need cooked mode inside a
  `raw_mode` block.  Used in `CommandLineInterface.run_in_terminal`.::
  
      with cooked_mode(stdin):
          ''' the pseudo-terminal stdin is now used in cooked mode. '''
code: def _patch_iflag(cls, attrs):
      # Turn the ICRNL flag back on. (Without this, calling `input()` in
      # run_in_terminal doesn't work and displays ^M instead. Ptpython
      # evaluates commands using `run_in_terminal`, so it's important that
      # they translate ^M back into ^J.)
      return attrs | termios.ICRNL
  
imports: from __future__ import unicode_literals
  import os
  import re
  import six
  import termios
  import tty
  from six.moves import range
  from ..keys import Keys
  from ..key_binding.input_processor import KeyPress
label_desc: Use image node_id 2 for calling the cooked_mode obj's underlying member method code with example usage: obj._patch_iflag(cls, attrs) and returns: unknown