Ref : https://github.com/python/cpython/pull/25174

https://github.com/localstack/localstack/blob/5a5edcd9d9ccbd6a56f23d71e3a1131b8c814996/localstack/utils/common.py#L324
if config.EDGE_PORT_HTTP:
        result = 'ports %s/%s' % (config.EDGE_PORT, config.EDGE_PORT_HTTP)
    else:
        result = 'port %s' % config.EDGE_PORT
    result = '%s %s' % (get_service_protocol(), result)
    return result
def timestamp(time=None, format=TIMESTAMP_FORMAT):
    if not time:
        time = datetime.utcnow()
    if isinstance(time, six.integer_types + (float, )):
        time = datetime.fromtimestamp(time)
    return time.strftime(format)
def timestamp_millis(time=None):
    microsecond_time = timestamp(time=time, format=TIMESTAMP_FORMAT_MICROS)
    
    return microsecond_time[:-4] + microsecond_time[-1]
def epoch_timestamp():
    return time.time()
def retry(function, retries=3, sleep=1, sleep_before=0, **kwargs):
    raise_error = None
    if sleep_before > 0:
        time.sleep(sleep_before)
    for i in range(0, retries + 1):
        try:
            return function(**kwargs)
        except Exception as error:
            raise_error = error
            time.sleep(sleep)
    raise raise_error
def dump_thread_info():