def ReadPolicyDoc(filename: str) -> str:
  """Read and return the IAM policy doc at filename.

  Args:
    filename (str): the name of the policy file in the iampolicies directory.

  Returns:
    str: The policy doc.

  Raises:
    OSError: If the policy file cannot be opened, read or closed.
  """

  try:
    policy_path = os.path.join(
        os.path.dirname(os.path.realpath(__file__)), IAM_POLICY_DIR, filename)
    with open(policy_path, encoding='utf-8') as policy_doc:
      return policy_doc.read()
  except OSError as exception:
    raise OSError(
        'Could not open/read/close the policy doc {0:s}: {1:s}'.format(
            policy_path, str(exception))) from exception
Read and return the IAM policy doc at filename.

Args:
filename (str): the name of the policy file in the iampolicies directory.

Returns:
str: The policy doc.

Raises:
OSError: If the policy file cannot be opened, read or closed.
libcloudforensics/providers/aws/internal/iam.py