code: def _log_key_value(
      self,
      items: List[Tuple[any, any]],
      is_show_count: bool = True,
      is_expand: bool = False,
      n_key_values: int = 10,
  ):
      max_key_len = 0
      for k, v in items:
          max_key_len = max(max_key_len, len(str(k)))
  
      count = len(items)
      if n_key_values > 0 and count > n_key_values + 1:
          items = items[:n_key_values]
  
      if is_expand:
          for k, v in items:
              self.parts.append([(k, Text.heading)])
              self.parts.append(_get_value_full(v))
      else:
          for k, v in items:
              spaces = " " * (max_key_len - len(str(k)))
              self.parts.append(
                  [(f"{spaces}{k}: ", Text.key)] + _get_value_line(v)
              )
  
      if n_key_values > 0 and count > n_key_values + 1:
          self.parts.append([("...", Text.meta)])
  
      if is_show_count:
          self.parts.append(
              ["Total ", (str(count), Text.meta), " item(s)"]
          )
  
imports: import collections
  import math
  from typing import TYPE_CHECKING, List, Tuple
  from labml.internal.util.colors import StyleCode
  from ....logger import Text
label_desc: Use image node_id 2 for calling the _InspectLogger obj's underlying member method code with example usage: obj._log_key_value(items, is_show_count, is_expand, n_key_values) without return types