code: def _io_wrapper(file, mode="r", *args, **kwargs):
      if mode == "r":
          return TextIOWrapper(file, *args, **kwargs)
      elif mode == "rb":
          return file
      raise ValueError(
          "Invalid mode value '{}', only 'r' and 'rb' are supported".format(
              mode
          )
      )
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_vendor/importlib_resources/_adapters.py
imports: from contextlib import suppress
  from io import TextIOWrapper
  from .None import abc
label_desc: Use image node_id 1 for calling a global function with example usage: _io_wrapper(file, mode) and returns: TextIOWrapper, file