import torch


def pad_feature_map(feature_map: torch.Tensor, padding_size: int):
    """Zero-pad feature map by a constant padding margin.
    Args:
        feature_map: The map to extract features from.
        padding_size: The padding size.
    """
    return torch.nn.ConstantPad2d(padding_size, 0.0)(feature_map)