code: def apply_transformer_t_model(network):
      
  
      z_series = network.transformers.r_pu + 1j*network.transformers.x_pu
      y_shunt = network.transformers.g_pu + 1j*network.transformers.b_pu
  
      ts_b = (network.transformers.model == "t") & (y_shunt != 0.)
  
      if ts_b.zsum() == 0:
          return
  
      za,zb,zc = wye_to_delta(z_series.loc[ts_b]/2,z_series.loc[ts_b]/2,1/y_shunt.loc[ts_b])
  
      network.transformers.loc[ts_b,"r_pu"] = zc.real
      network.transformers.loc[ts_b,"x_pu"] = zc.imag
      network.transformers.loc[ts_b,"g_pu"] = (2/za).real
      network.transformers.loc[ts_b,"b_pu"] = (2/za).imag
docs: Convert given T-model parameters to PI-model parameters using wye-delta transformation