import re


def seconds_to_time(seconds, format='{}:{:02}:{:02}', remove_leading_zeroes=True):
    """Convert seconds to timestamp.

    :param seconds: Number of seconds
    :type seconds: int
    :param format: The format string with elements representing hours, minutes and seconds. Defaults to '{}:{:02}:{:02}'
    :type format: str, optional
    :param remove_leading_zeroes: Whether to remove leading zeroes when seconds > 60, defaults to True
    :type remove_leading_zeroes: bool, optional
    :return: The corresponding timestamp string
    :rtype: str
    """
    h, remainder = divmod(abs(int(seconds)), 3600)
    m, s = divmod(remainder, 60)
    time_string = format.format(h, m, s)
    return ('-' if seconds < 0 else '') + (re.sub(r'^0:0?', '', time_string) if remove_leading_zeroes else time_string)