import json


def get_policy(client, arn: str, version: str) -> str:
    """Get the contents of this version of the policy with this ARN.

    This is opposite of the AWS API name where `get_policy_version` returns the policy's contents,
    not just its version.
    """

    policy = client.get_policy_version(PolicyArn=arn, VersionId=version)
    return json.dumps(policy["PolicyVersion"]["Document"], indent=4)