class_docstr: A ResourceBundle manages internationalization of string resources
code: def _get_parent_bundle(self) -> ResourceBundle | None:
      # This is the root bundle
      if self._locale is None:
          return None
  
      # Cut one part off of the locale
      *parts, _ = self._locale.split("_")
      # If nothing is left set the locale to None else to the shortened locale
      parent_locale = "_".join(parts) if len(parts) > 0 else None
      # If cached
      if self.__cached_bundles.get(parent_locale) is not None:
          return self.__cached_bundles.get(parent_locale)
      # Not cached, start building chain
      return ResourceBundle(self._name, parent_locale, path=self._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 6 for calling the ResourceBundle obj's underlying member method code with example usage: obj._get_parent_bundle() and returns: ResourceBundle, None, self