def constantize(term):
    """Formats a term (string) to look like a Constant."""
    # Replace spaces by underscores and enclose in quotes for a Constant term
    return f"'{term.replace(' ', '_')}'"