class_docstr: Cross-platform formatted string
  
  Args:
      text(str) : Text content
      width(int) : Text length, if the text is less than the specified length, it will be filled with spaces
      align(str) : Text alignment, it must be:
          ========   ====================================
          Charater   Meaning
          --------   ------------------------------------
          '<'        The text will remain left aligned
          '^'        The text will remain middle aligned
          '>'        The text will remain right aligned
          ========   ====================================
      color(str) : Text color, default is None(depends on terminal configuration)
class_docstr_tok: ["Cross-platform","formatted","string","Args",":","text","(","str",")",":","Text","content","width","(","int",")",":","Text","length",",","if","the","text","is","less","than","the","specified","length",",","it","will","be","filled","with","spaces","align","(","str",")",":","Text","alignment",",","it","must","be",":","========","====================================","Charater","Meaning","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","'","<","'","The","text","will","remain","left","aligned","'^","'","The","text","will","remain","middle","aligned","'",">","'","The","text","will","remain","right","aligned","========","====================================","color","(","str",")",":","Text","color",",","default","is","None","(","depends","on","terminal","configuration",")"]
code: def __init__(
      self,
      text: str,
      width: int = None,
      align: str = "<",
      color: str = None,
  ):
      self.text = text
      self.align = align
      self.color = FormattedText._MAP[color] if color else color
      self.width = width if width else len(self.text)
  
imports: import contextlib
  import copy
  import functools
  import logging
  import os
  import sys
  import time
  import threading
  from typing import List
  import colorlog
  from colorama import Fore
  import paddlehub.config
  from paddlehub.env import LOG_HOME
label_desc: Use image node_id 1 to create a new FormattedText object from inherited base classes: object with example: obj = FormattedText(text, width, align, color)