code: def _wrap_io_open(
      file: t.Union[str, "os.PathLike[str]", int],
      mode: str,
      encoding: t.Optional[str],
      errors: t.Optional[str],
  ) -> t.IO[t.Any]:
      """Handles not passing ``encoding`` and ``errors`` in binary mode."""
      if "b" in mode:
          return open(file, mode)
  
      return open(file, mode, encoding=encoding, errors=errors)
  
imports: import codecs
  import io
  import os
  import re
  import sys
  import typing
  from weakref import WeakKeyDictionary
label_desc: Use image node_id 20 for calling a global function with example usage: _wrap_io_open(file, mode, encoding, errors) and returns: open, open