<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _build_enum_type(var, property_path=None):
 """ Builds schema definitions for enum type values. :param var: The enum type value :param List[str] property_path: The property path of the current type, defaults to None, optional :return: The built schema definition :rtype: Dict[str, Any] """


    if not property_path:
        property_path = []

    entry = var.metadata[CONFIG_KEY]
    enum_values = [member.value for member in entry.type.__members__.values()]
    schema = {"enum": enum_values}

    for (type_name, check) in dict(
        bool=is_bool_type,
        string=is_string_type,
        number=is_number_type,
        integer=is_integer_type,
    ).items():
        if all(check(type(_)) for _ in enum_values):
            schema["type"] = type_name
            break

    return schema