def get_all_identies_from_analysis_query_response(response):
    """Returns all identites from policy anayzer api's response.

  Args:
    response: response of policy analyzer api.
  """
    unique_identities = set()
    for r in response.main_analysis.analysis_results:
        for identity in r.identity_list.identities:
            unique_identities.add(identity.name)
    return unique_identities