code: def _format_array(x, fmt):
      # type: (Any, str) -> str
      
      value_repr = ", ".join(fmt.format(v) for v in x)
      return "[{}]".format(value_repr)
docs: >>> _format_array([0, 1.0], "{:0.3f}")
      '[0.000, 1.000]'