code: def format_value(value, sf=3):
      
      if isinstance(value, str):
          return value
  
      elif isinstance(value, list) or isinstance(value, np.ndarray):
          value = list(value)
          for i in range(len(value)):
              vv = format_value(value[i])
              value[i] = vv
          return "[" + ", ".join(value) + "]"
  
      elif value is None:
          return "N/A"
  
      else:
          fmt_str = "{0:.%ig}" % sf
          return fmt_str.format(value)
docs: convert a parameter value into a formatted string with certain significant figures
  
      :param value: the value to be formatted
      :param sf: number of significant figures
      :return: str