code: def get_query_targets(cli_ctx, apps, resource_group):
      
      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
docs: Produces a list of uniform GUIDs representing applications to query.