def label_from_id(id_string):
    """
    Returns a label string constructed from the suppliued Id string

    Underscore characters in the Id are replaced by spaces.
    The first character may be capirtalized.

    >>> label_from_id("entity_id") == "Entity id"
    True
    """
    temp  = id_string.replace('_', ' ').strip()
    label = temp[0].upper() + temp[1:] 
    return label