import re


def _defaults_to_code(val):
    """
    Make sure that any defaults that are surrounded by << >>  are in code quotes so that they render properly.
      e.g.: <<display_name>> converts to '<<display_name>>'
    """
    return re.sub(r"(<{2}.*>{2})", r"`\1`", val)