Provide a brief description of the following text:

[ Loaded from /Users/lucas/projects/me/lib/python/wsh/spinner.py ]
```
# Thanks: @Dorcioman

from itertools import cycle
import threading
import time, sys, math

from colorama import Fore, Back, Style

# parts = "▁ ▂ ▃ ▄ ▅ ▄ ▃ ▁".split(" ")
parts = "▁ ▂ ▃ ▄ ▅ ▆ ▅ ▄ ▃ ▁".split(" ")
# parts = "▁ ▂ ▃ ▄ ▅ ▆ ▇ ▆ ▅ ▄ ▃ ▁".split(" ")

frames = []
for offset in range(0, len(parts)):
  frames.append(' '.join(parts[offset:] + parts[:offset]))
frames.reverse()

class Spinner:
    # __default_spinner_symbols_list = ['|-----|', '|#----|', '|-#---|', '|--#--|', '|---#-|', '|----#|']
    __default_spinner_symbols_list = frames

    def __init__(self, spinner_symbols_list: [str] = None):
        spinner_symbols_list = spinner_symbols_list if spinner_symbols_list else Spinner.__default_spinner_symbols_list
        self.__screen_lock = threading.Event()
        self.__spinner = cycle(spinner_symbols_list)
        self.__stop_event = False
        self.__thread = None

    def __enter__(self):
      self.start("")

    def __exit__(self, *args):
      self.stop()

    def get_spin(self):
        return self.__spinner

    def start(self, spinner_message: str):
        start_time = time.time()
        self.__stop_event = False
        time.sleep(0.05)

        def run_spinner(message):
            while not self.__stop_event:
                # print("\r{message}{spinner}".format(message=message, spinner=next(self.__spinner)) + f" [ {math.floor(time.time() - start_time)}s ]", end="")
                print(f"\r[ {math.floor(time.time() - start_time)}s ] " + "{message}{spinner}  ".format(message=message, spinner=next(self.__spinner)), end="")
                time.sleep(0.05)

            self.__screen_lock.set()

        self.__thread = threading.Thread(target=run_spinner, args=(spinner_message,), daemon=True)
        self.__thread.start()

    def stop(self):
        self.__stop_event = True
        if self.__screen_lock.is_set():
            self.__screen_lock.wait()
            self.__screen_lock.clear()
        print("\r                                              ", end="")
        print("\r", end="")
        # print('            ')

```