<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def output_to_table(obj, olist='inputs', oformat='latex', table_ends=False, prefix=""):
 """ Compile the properties to a table. :param olist: list, Names of the parameters to be in the output table :param oformat: str, The type of table to be output :param table_ends: bool, Add ends to the table :param prefix: str, A string to be added to the start of each parameter name :return: para, str, table as a string """

    para = ""
    property_list = []
    if olist == 'inputs':
        property_list = obj.inputs
    elif olist == 'all':
        for item in obj.__dict__:
            if "_" != item[0]:
                property_list.append(item)
    for item in property_list:
        if hasattr(obj, item):
            value = getattr(obj, item)
            value_str = format_value(value)
            if oformat == "latex":
                delimeter = " & "
            else:
                delimeter = ","
            para += "{0}{1}{2}\\\\\n".format(prefix + format_name(item), delimeter, value_str)
    if table_ends:
        para = add_table_ends(para, oformat)
    return para