class_docstr: Sets up an Amazon SageMaker Collection.
docstr: Moves a Model Group from one Collection to another.
  
  Args:
      source_collection_name (str): The name of the source Collection.
      model_group (str): The name of the Model Group to move.
      destination_collection_name (str): The name of the destination Collection.
docstr_tok: ["Moves","a","Model","Group","from","one","Collection","to","another",".","Args",":","source_collection_name","(","str",")",":","The","name","of","the","source","Collection",".","model_group","(","str",")",":","The","name","of","the","Model","Group","to","move",".","destination_collection_name","(","str",")",":","The","name","of","the","destination","Collection","."]
code: def move_model_group(
      self,
      source_collection_name: str,
      model_group: str,
      destination_collection_name: str,
  ):
      """Moves a Model Group from one Collection to another.
  
      Args:
          source_collection_name (str): The name of the source Collection.
          model_group (str): The name of the Model Group to move.
          destination_collection_name (str): The name of the destination Collection.
      """
      remove_details = self.remove_model_groups(
          collection_name=source_collection_name,
          model_groups=[model_group],
      )
      if len(remove_details["failure"]) == 1:
          raise Exception(remove_details["failure"][0]["failure"])
  
      added_details = self.add_model_groups(
          collection_name=destination_collection_name,
          model_groups=[model_group],
      )
  
      if len(added_details["failure"]) == 1:
          # adding the Model Group back to the source collection in case of an add failure
          self.add_model_groups(
              collection_name=source_collection_name,
              model_groups=[model_group],
          )
          raise Exception(added_details["failure"][0]["failure"])
  
      return {
          "moved_success": model_group,
      }
  
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 10 for calling the Collection obj's underlying member method code with example usage: obj.move_model_group(source_collection_name, model_group, destination_collection_name) and returns: dict