  def AbandonNodes() -> None:
    """Abandons the nodes from their respective managed instance groups."""
    compute_project = compute.GoogleCloudCompute(project_id)
    groups_by_instance = compute_project.ListMIGSByInstanceName(location)
    for node in workload_nodes:
      if node.name in groups_by_instance:
        logger.info(
            'Abandoning instance {0:s} from respective managed instance '
            'group...'.format(node.name))
        instance = compute_project.GetInstance(node.name)
        instance.AbandonFromMIG(groups_by_instance[instance.name])
      else:
        logger.warning(
            'Could not abandon {0:s} from respective managed instance '
            'group, parent managed instance group not found.'.format(node.name))
Abandons the nodes from their respective managed instance groups.
libcloudforensics/providers/gcp/forensics.py