code: def _maybe_open(archive, mode):
      if isinstance(archive, (str, os.PathLike)):
          with open(archive, mode) as f:
              yield f
      else:
          yield archive
  
file_path: catboost/contrib/tools/python3/src/Lib/zipapp.py
imports: import contextlib
  import os
  import pathlib
  import shutil
  import stat
  import sys
  import zipfile
label_desc: Use image node_id 1 for calling a global function with example usage: _maybe_open(archive, mode) without return types