code: def get_io_object(file: Union[IO, str, Path], *args, **kwargs) -> IO:
      """
      providing a easy interface to get an IO object
  
      Parameters
      ----------
      file : Union[IO, str, Path]
          a object representing the file
  
      Returns
      -------
      IO:
          a IO-like object
  
      Raises
      ------
      NotImplementedError:
      """
      if isinstance(file, IO):
          yield file
      else:
          if isinstance(file, str):
              file = Path(file)
          if not isinstance(file, Path):
              raise NotImplementedError(
                  f"This type[{type(file)}] of input is not supported"
              )
          with file.open(*args, **kwargs) as f:
              yield f
  
file_path: qlib/qlib/utils/file.py
imports: import os
  import shutil
  import tempfile
  import contextlib
  from typing import Optional, Text, IO, Union
  from pathlib import Path
  from qlib.log import get_module_logger
label_desc: Use image node_id 5 for calling a global function with example usage: get_io_object(file) without return types