code: def update_linear_policies(self):
      self.conv_linear_layer = False
      if self.linear_layer_setting is not None:
          self.linear_policies = {
              self.linear_layer_setting[0]: self._replace
          }
          if len(self.linear_layer_setting) == 2:
              self.linear_policies.update(
                  {self.linear_layer_setting[1]: self._slice_embedding}
              )
      else:
          import transformers
  
          if (
              self.orig_layer_impl
              is transformers.models.gpt2.modeling_gpt2.GPT2Block
          ):
              try:
                  self.conv_linear_layer = True
                  self.linear_policies = {
                      transformers.pytorch_utils.Conv1D: self._replace
                  }
              except ImportError:
                  self.linear_policies = {nn.Linear: self._replace}
          else:
              self.linear_policies = {
                  nn.Linear: self._replace,
                  nn.Embedding: self._slice_embedding,
              }
  
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 13 for calling the AutoTP obj's underlying member method code with example usage: obj.update_linear_policies() without return types