code: def ascii_native_(s):
      '''
      Python 3: If ``s`` is an instance of ``text_type``, return
      ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')``
  
      Python 2: If ``s`` is an instance of ``text_type``, return
      ``s.encode('ascii')``, otherwise return ``str(s)``
      '''
      if isinstance(s, text_type):
          s = s.encode('ascii')
  
      return str(s, 'ascii', 'strict') if PY3 else f ascii_native_(s):
      '''
      Python 3: If ``s`` is an instance of ``text_type``, return
      ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')``
  
      Python 2: If ``s`` is an instance of ``text_type``, return
      ``s.encode('ascii')``, otherwise return ``str(s)``
      '''
      if isinstance(s, text_type):
          s = s.encode('ascii')
  
      return str(s, 'ascii', 'strict') if PY3 else s
docs: Python 3: If ``s`` is an instance of ``text_type``, return
      ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')``
  
      Python 2: If ``s`` is an instance of ``text_type``, return
      ``s.encode('ascii')``, otherwise return ``str(s)``