parameters: (string, encoding='ascii')
return_statement: return out
docstring: Given a string object, regardless of type, returns a representation of
      that string in the native string type, encoding and decoding where
      necessary. This assumes ASCII unless told otherwise.
docstring_summary: Given a string object, regardless of type, returns a representation of
      that string in the native string type, encoding and decoding where
      necessary. This assumes ASCII unless told otherwise.
docstring_tokens: Given a string object regardless of type returns a representation of that string in the native string type encoding and decoding where necessary . This assumes ASCII unless told otherwise .
function: def to_native_string(string, encoding='ascii'):
      """Given a string object, regardless of type, returns a representation of
      that string in the native string type, encoding and decoding where
      necessary. This assumes ASCII unless told otherwise.
      """
      if isinstance(string, builtin_str):
          out = string
      else:
          if is_py2:
              out = string.encode(encoding)
          else:
              out = string.decode(encoding)
  
      return out
function_tokens: def to_native_string ( string , encoding = 'ascii' ) : if isinstance ( string , builtin_str ) : out = string else : if is_py2 : out = string . encode ( encoding ) else : out = string . decode ( encoding ) return out