class_docstr: A ResourceBundle manages internationalization of string resources
code: def _ensure_path(path: str | PathLike | None) -> Path:
      if isinstance(path, PathLike):
          return Path(path.__fspath__())
      if isinstance(path, str):
          return Path(path)
      if path is None:
          return Path()
      raise TypeError(
          f"Path must be of type str or PathLike, not {type(path)}"
      )
  
imports: from __future__ import annotations
  import codecs
  import os
  import re
  from os import PathLike
  from pathlib import Path
  from typing import KeysView, Sequence
  from .exceptions import MalformedResourceBundleError, NotInResourceBundleError
label_desc: Use image node_id 8 for calling the ResourceBundle obj's underlying member method code with example usage: obj._ensure_path(path) and returns: Path, Path, Path