<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_deadline(deadline):
 """Translate deadline date from human-acceptable format to the machine-acceptable"""

        if '-' in deadline and len(deadline) == 10:
            return deadline

        if '.' in deadline and len(deadline) == 10:  # russian format dd.mm.yyyy to yyyy-mm-dd
            dmy = deadline.split('.')
            if len(dmy) == 3 and all(v is not None for v in dmy):
                return '-'.join(reversed(dmy))

        raise exceptions.RumetrUnparsableDeadline()