class_docstr: Sets up an Amazon SageMaker Collection.
docstr: Converts a Collection response from the resource group api to a Collection list response.
  
  Args:
      group_resource_details (List[dict]): The Collection list response from the
          resource group api.
      is_model_group (bool): Indicates if the response is of Collection or Model Group type.
docstr_tok: ["Converts","a","Collection","response","from","the","resource","group","api","to","a","Collection","list","response",".","Args",":","group_resource_details","(","List","[","dict","]",")",":","The","Collection","list","response","from","the","resource","group","api",".","is_model_group","(","bool",")",":","Indicates","if","the","response","is","of","Collection","or","Model","Group","type","."]
code: def _convert_group_resource_response(
      self,
      group_resource_details: List[dict],
      is_model_group: bool = False,
  ):
      """Converts a Collection response from the resource group api to a Collection list response.
  
      Args:
          group_resource_details (List[dict]): The Collection list response from the
              resource group api.
          is_model_group (bool): Indicates if the response is of Collection or Model Group type.
      """
      collection_details = []
      if group_resource_details["Resources"]:
          for resource_group in group_resource_details["Resources"]:
              collection_arn = resource_group["Identifier"][
                  "ResourceArn"
              ]
              collection_name = collection_arn.split("group/")[1]
              collection_details.append(
                  {
                      "Name": collection_name,
                      "Arn": collection_arn,
                      "Type": resource_group["Identifier"][
                          "ResourceType"
                      ]
                      if is_model_group
                      else "Collection",
                  }
              )
      return collection_details
  
imports: from __future__ import absolute_import
  import json
  import time
  from typing import List
  from botocore.exceptions import ClientError
  from sagemaker.session import Session
label_desc: Use image node_id 12 for calling the Collection obj's underlying member method code with example usage: obj._convert_group_resource_response(group_resource_details, is_model_group) and returns: collection_details