<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_date_in_588(date_str):
 """ Convert date in the format ala 03.02.2017 to 3.2.2017. Viz #100 for details. """

    try:
        date_tokens = (int(x) for x in date_str.split("."))
    except ValueError:
        return date_str

    return ".".join(str(x) for x in date_tokens)