code: def test_errorfix_decoding_cp1251():
      @library.python.windows.errorfix
      def erroneous_func():
          model_msg = "Какое-то описание ошибки"
          if library.python.windows.on_win():
              err = WindowsError()
              err.strerror = library.python.strings.to_str(
                  model_msg, "cp1251"
              )
          else:
              err = OSError()
              err.strerror = library.python.strings.to_str(model_msg)
          raise err
  
      with pytest.raises(OSError) as errinfo:
          erroneous_func()
      error_msg = errinfo.value.strerror
      if not isinstance(errinfo.value.strerror, six.text_type):
          error_msg = library.python.strings.to_unicode(error_msg)
      assert error_msg == "Какое-то описание ошибки"
  
file_path: catboost/library/python/windows/ut/test_windows.py
imports: import errno
  import os
  import pytest
  import six
  import library.python.strings
  import library.python.windows
label_desc: Use image node_id 4 for calling a global function with example usage: test_errorfix_decoding_cp1251() without return types