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()
Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    
product/gradle-plugin/src/main/python/pkg_resources/_vendor/importlib_resources/_legacy.py