code: def update_policy_list(policy_list, new_module, new_gems):
      if len(policy_list):
          for i, policy in enumerate(policy_list):
              # if module already exists in policy, combine gems and remove duplicates
              if policy[0] == type(new_module):
                  new_gems = set(new_gems + policy[1])
                  policy_list[i] = tuple([type(new_module), new_gems])
                  return policy_list
      policy_list.append(tuple([type(new_module), new_gems]))
      return policy_list
  
imports: import re
  from torch import nn
  from .replace_policy import replace_policies
  from typing import Optional
  import torch
  from deepspeed import comm
  from .layers import LinearAllreduce, LinearLayer, LmHeadLinearAllreduce
  from deepspeed.accelerator import get_accelerator
  from .fusedqkv_utils import require_tp_fused_qkvw, prepare_tp_fused_qkvw
  from deepspeed.module_inject.tp_shard import get_shard_size, get_shard_size_list
label_desc: Use image node_id 6 for calling the AutoTP obj's underlying member method code with example usage: obj.update_policy_list(policy_list, new_module, new_gems) and returns: policy_list, policy_list