<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_text(data):
 """ Serializes a python object as plain text If the data can be serialized as JSON, this method will use the to_json method to format the data, otherwise the data is returned as is. """

    try:
        serialized_content = to_json(data, indent=4)
    except Exception, e:
        serialized_content = data
    return serialized_content