code: def read_text(
      package: Package,
      resource: Resource,
      encoding: str = "utf-8",
      errors: str = "strict",
  ) -> str:
      """Return the decoded string of the resource.
  
      The decoding-related arguments have the same semantics as those of
      bytes.decode().
      """
      with open_text(package, resource, encoding, errors) as fp:
          return fp.read()
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_vendor/importlib_resources/_legacy.py
imports: import functools
  import os
  import pathlib
  import types
  import warnings
  from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any
  from .None import _common
label_desc: Use image node_id 6 for calling a global function with example usage: read_text(package, resource, encoding, errors) and returns: fp