code: def decode_format(number_format):
      
  
      style = number_format[0]
      prec = "." + str(int(number_format[1:])) if len(number_format) > 1 else ""
  
      if style == NUMBER:
          return "," + prec + "g","",1.
  
      elif style == THOUSANDS:
          return "," + prec + "g","k",1e-3
  
      elif style == MILLIONS:
          return "," + prec + "g","m",1e-6
  
      elif style == BILLIONS:
          return "," + prec + "g","bn",1e-9
  
      elif style == TRILLIONS:
          return "," + prec + "g","tr",1e-12
  
      elif style == PERCENTAGE:
          return prec + "f","%",1e2
  
      elif style == BASIS_POINTS:
          return prec + "f","bp",1e4
  
      elif style == INTEGER:
          return "d","",1.
  
      elif style == SCIENTIFIC:
          return ".4e","",1.
  
      else: # style FLOAT
          return prec + "f","",1.
docs: Convert style string to format string ('{}' style), suffix and value scale
      
      This is the core function used to convert numbers to strings