code: def make_str(value):
      
      if isinstance(value, bytes):
          try:
              return value.decode(sys.getfilesystemencoding())
          except UnicodeError:
              return value.decode('utf-8', 'replace')
      return text_type(value)
docs: Converts a value into a valid string.