function renderDynamicBadge({
  defaultLabel,
  tag,
  value,
  prefix = '',
  suffix = '',
}) {
  const renderedValue =
    value === undefined ? 'not specified' : toArray(value).join(', ')
  return {
    label: tag ? `${defaultLabel}@${tag}` : defaultLabel,
    message: `${prefix}${renderedValue}${suffix}`,
    color: 'blue',
  }
}
Handles rendering concerns of dynamic badges.
Determines the label of the badge according to the tag and defaultLabel.
Determines the message of the badge according to the prefix, suffix and value.
Sets the color of the badge to blue.

@param {object} attrs Refer to individual attributes
@param {string} attrs.defaultLabel default badge label
@param {string} [attrs.tag] If provided then this value will be appended to the badge label, e.g. `foobar@v1.23`
@param {any} attrs.value Value or array of value to be used for the badge message
@param {string} [attrs.prefix] If provided then the badge message will use this value as a prefix
@param {string} [attrs.suffix] If provided then the badge message will use this value as a suffix
@returns {object} Badge with label, message and color properties