code: def nativestring(val, encodings=None):
      
      # if it is already a native python string, don't do anything
      if type(val) in (bytes_type, unicode_type):
          return val
  
      # otherwise, attempt to return a decoded value
      try:
          return unicode_type(val)
      except StandardError:
          pass
  
      try:
          return bytes_type(val)
      except StandardError:
          return decoded(val)
docs: Converts the inputted value to a native python string-type format.
      
      :param      val         | <variant>
                  encodings   | (<str>, ..) || None
      
      :sa         decoded
      
      :return     <unicode> || <str>