code: def stringify_slice_key(slice_key: SliceKeyType) -> Tuple[str, str]:
      """Stringifies a slice key.
  
      The string representation of a SingletonSliceKeyType is "feature:value". When
      multiple columns / features are specified, the string representation of a
      SliceKeyType is "c1, c2, ...:v1, v2, ..." where c1, c2, ... are the column
      names and v1, v2, ... are the corresponding values For example,
      ('gender, 'f'), ('age', 5) befores age, gender:f, 5. If no columns / feature
      specified, return "Overall".
  
      Note that we do not perform special escaping for slice values that contain
      ', '. This stringified representation is meant to be human-readbale rather
      than a reversible encoding.
  
      The columns will be in the same order as in SliceKeyType. If they are
      generated using SingleSliceSpec.generate_slices, they will be in sorted order,
      ascending.
  
      Technically float values are not supported, but we don't check for them here.
  
      Args:
        slice_key: Slice key to stringify. The constituent SingletonSliceKeyTypes
          should be sorted in ascending order.
  
      Returns:
        A tuple of string representation of the slice key and slice value.
      """
      key_count = len(slice_key)
      if not key_count:
          return ("Overall", "Overall")
  
      keys = []
      values = []
      separator = ", "
  
      for feature, value in slice_key:
          keys.append(feature)
          values.append(value)
  
      # To use u'{}' instead of '{}' here to avoid encoding a unicode character with
      # ascii codec.
      return (
          separator.join(["{}".format(key) for key in keys]),
          separator.join(["{}".format(value) for value in values]),
      )
  
file_path: model-card-toolkit/model_card_toolkit/utils/graphics.py
imports: import base64
  import io
  import logging
  from typing import Optional, Sequence, Tuple, Union
  import attr
  import matplotlib
  import matplotlib.pyplot
label_desc: Use image node_id 3 for calling a global function with example usage: stringify_slice_key(slice_key) and returns: separator,  separator, str,  str