def get_query_targets(cli_ctx, apps, resource_group):
    """Produces a list of uniform GUIDs representing applications to query."""
    if isinstance(apps, list):
        if resource_group:
            return [get_id_from_azure_resource(cli_ctx, apps[0], resource_group)]
        return list(map(lambda x: get_id_from_azure_resource(cli_ctx, x), apps))
    else:
        if resource_group:
            return [get_id_from_azure_resource(cli_ctx, apps, resource_group)]
        return apps
Produces a list of uniform GUIDs representing applications to query.