in kernels-mixer/kernels_mixer/kernelspecs.py [0:0]
def append_display_name(spec, suffix):
"""Append the given suffix onto the display name of the given kernelspec.
The supplied kernelspec is updated in place.
Args:
spec: Either an object with a "display_name" attribute, or a
dictionary with a "display_name" string field.
suffix: A string suffix to append to the spec's display name.
"""
if hasattr(spec, "display_name"):
spec.display_name = spec.display_name + suffix
else:
spec["display_name"] = spec.get("display_name", "") + suffix