<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def safe_index(cls, unique_id):
 """ Return a valid elastic index generated from unique_id """

        index = unique_id
        if unique_id:
            index = unique_id.replace("/", "_").lower()
        return index