def METHOD_NAME(
    fmaps_in,
    kernel_size,
    num_fmaps,
    num_repetitions,
    activation="relu",
    name="conv_pass",
):
    """Create a convolution pass::
        f_in --> f_1 --> ... --> f_n
    where each ``-->`` is a convolution followed by a (non-linear) activation
    function and ``n`` ``num_repetitions``. Each convolution will decrease the
    size of the feature maps by ``kernel_size-1``.
    Args:
        f_in:
            The input tensor of shape ``(batch_size, channels, depth, height,
            width)`` or ``(batch_size, channels, height, width)``.
        kernel_size:
            Size of the kernel. Forwarded to the tensorflow convolution layer.
        num_fmaps:
            The number of feature maps to produce with each convolution.
        num_repetitions:
            How many convolutions to apply.
        activation:
            Which activation to use after a convolution. Accepts the name of any
            tensorflow activation function (e.g., ``relu`` for ``tf.nn.relu``).
    """
    fmaps = fmaps_in
    if activation is not None:
        activation = getattr(tf.nn, activation)
    conv_layer = getattr(
        tf.layers, {2: "conv2d", 3: "conv3d"}[fmaps_in.get_shape().ndims - 2]
    )
    for i in range(num_repetitions):
        fmaps = conv_layer(
            inputs=fmaps,
            filters=num_fmaps,
            kernel_size=kernel_size,
            padding="valid",
            data_format="channels_first",
            activation=activation,
            name=name + "_%i" % i,
        )
    return fmaps