def METHOD_NAME(tensor, pruning_info):
  """Pad tensor with zeros by given pruning_info.
    Restore the tensor to its original unpruned shape and use zeros to fill
    in the removed input/output channels.
    [100, 60, 3, 3] -> [128, 64, 3, 3]
  """
  shape = list(tensor.shape)
  # OIHW for 4 dims, OI for 2 dims.
  orig_out_channels = shape[0] + len(pruning_info.removed_outputs)
  # Pad output channels.
  shape[0] = orig_out_channels
  out_padded_tensor = torch.zeros(shape, dtype=tensor.dtype)
  index = 0
  for axis in range(orig_out_channels):
    if axis not in pruning_info.removed_outputs:
      out_padded_tensor[axis] = tensor[index]
      index += 1
  if len(shape) < 2:
    return out_padded_tensor
  # Pad input channels.
  orig_in_channels = shape[1] + len(pruning_info.removed_inputs)
  shape[1] = orig_in_channels
  in_padded_tensor = torch.zeros(shape, dtype=tensor.dtype)
  index = 0
  for axis in range(orig_in_channels):
    if axis not in pruning_info.removed_inputs:
      in_padded_tensor[:, axis] = out_padded_tensor[:, index]
      index += 1
  return in_padded_tensor