def METHOD_NAME(
    self, association_id: str
) -> IamInstanceProfileAssociation:
    iam_instance_profile_association = None
    for association_key in self.iam_instance_profile_associations.keys():
        if (
            self.iam_instance_profile_associations[association_key].id
            == association_id
        ):
            iam_instance_profile_association = (
                self.iam_instance_profile_associations[association_key]
            )
            del self.iam_instance_profile_associations[association_key]
            # Deleting once and avoiding `RuntimeError: dictionary changed size during iteration`
            break
    if not iam_instance_profile_association:
        raise InvalidAssociationIDIamProfileAssociationError(association_id)
    return iam_instance_profile_association