def _parse_time(self, value):
try:<EOL><INDENT>return int(value) * <NUM_LIT:1000><EOL><DEDENT>except ValueError:<EOL><INDENT>m = self.time_format.match(value)<EOL>if not m:<EOL><INDENT>raise ValueError("<STR_LIT>".format(t=value))<EOL><DEDENT>time = int(m.group('<STR_LIT:time>'))<EOL>if m.group('<STR_LIT>') != '<STR_LIT>':<EOL><INDENT>time *= <NUM_LIT:1000><EOL><DEDENT>return time<EOL><DEDENT>
Parse string time representation to get number of milliseconds.
        Raises the ``ValueError`` for invalid format.