import torch


def conv3x3(in_planes: int, out_planes: int, stride: int = 1, groups: int = 1, dilation: int = 1):
    """
    3x3 convolution with zero padding

    Args:
        in_planes (int): The number of input channels.
        out_planes (int): The number of output channels.
        stride (int): The convolution stride. Controls the stride for the cross-correlation
        groups (int): The number of groups in the convolution. Controls the connections between input and outputs.
        dilation (int): Controls the spacing between the kernel points

    Returns:
        :obj:`torch.nn.Conv3d`: A convolution layer.
    """
    return torch.nn.Conv3d(in_planes, out_planes, kernel_size=3, stride=stride,
                           padding=dilation, groups=groups, bias=False, dilation=dilation)