code: def _str_tensor_value(value: AnyNDArray) -> str:
      value_str = str(
          np.where(np.abs(value) < 1, value, np.around(value, 5))
      )
      if value.size <= 3:
          return value_str
  
      max_chars = 500
      value_str = value_str[:max_chars]
      regexp = _first_three_elements_regexp()
      match = regexp.match(value_str)
      assert match is not None
      brackets, elem1, elem2, elem3 = match.groups()
  
      out = f"{elem1}"
      if elem2 is not None:
          out = f"{out}{f', {elem2}'}"
          if elem3 is not None:
              out = f"{out}{f', {elem3}'}"
      if brackets is not None:
          out = f"{brackets}{out}..."
  
      return out
  
imports: import copy
  import re
  from functools import lru_cache
  from typing import Any, Callable, Dict, Mapping, Optional, Pattern, Tuple, Type, TypeVar, Union
  import numpy
  import tensorflow
  import tensorflow_probability
  from packaging.version import Version
  from tabulate import tabulate
  from tensorflow.python.util.object_identity import Reference
  from ..base import AnyNDArray, Parameter
  from ..config import default_summary_fmt
label_desc: Use image node_id 14 for calling a global function with example usage: _str_tensor_value(value) and returns: out, value_str