code: def _set_TP1D(self, pg: ProcessGroup):
      # TP1D Row Linear
      _compute_pattern = ComputePattern.TP1D
      self._register_allowed_patterns(
          compute_pattern=_compute_pattern,
          dist_specs={
              "weight": ShardSpec([0], [pg.tp_world_size()]),
          },
          mode="row",
      )
  
      # TP1D Col Linear
      self._register_allowed_patterns(
          compute_pattern=_compute_pattern,
          dist_specs={
              "weight": ShardSpec([-1], [pg.tp_world_size()]),
          },
          mode="col",
      )
  
      self._set_default(
          compute_pattern=_compute_pattern, target_mode="row"
      )
  
imports: from colossalai.legacy.tensor import ComputePattern, ProcessGroup, ShardSpec
  from .colo_module import ColoModule
label_desc: Use image node_id 3 for calling the ColoEmbedding obj's underlying member method code with example usage: obj._set_TP1D(pg) without return types