code: def _format_array(x, fmt):
      # type: (Any, str) -> str
      """
      >>> _format_array([0, 1.0], "{:0.3f}")
      '[0.000, 1.000]'
      """
      value_repr = ", ".join(fmt.format(v) for v in x)
      return "[{}]".format(value_repr)
  
imports: from typing import Any
  from eli5.base import TreeInfo, NodeInfo
label_desc: Use image node_id 3 for calling a global function with example usage: _format_array(x, fmt) and returns: str