def pad(value: int, length: int=2) ->str:
    """
    Adds leading and trailing zeros to value ("pads" the value).

    >>> pad(5)
    05
    >>> pad(9, 3)
    009

    :param value: integer value to pad
    :param length: Length to pad to
    :return: string of padded value"""
    return '{0:0>{width}}'.format(value, width=length)
