code: def _make_pathlike_fn(fn, nb_path_arg=1):
      """Wrap the function in a PathLike-compatible function."""
  
      @functools.wraps(fn)
      def new_fn(*args, **kwargs):
          # Normalize PathLike objects
          args = tuple(os.fspath(arg) for arg in args[:nb_path_arg])
          return fn(*args, **kwargs)
  
      return new_fn
  
file_path: datasets/tensorflow_datasets/core/tf_compat.py
imports: import functools
  import os
  from typing import Optional
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: _make_pathlike_fn(fn, nb_path_arg) and returns: new_fn, fn