def parse_datetime(s, **kwargs):
if not s:<EOL><INDENT>return None<EOL><DEDENT>try:<EOL><INDENT>ret = dateutil_parser(s, **kwargs)<EOL><DEDENT>except (OverflowError, TypeError, ValueError) as e:<EOL><INDENT>logger.exception(e, exc_info=True)<EOL>reraise('<STR_LIT>' % s, e)<EOL><DEDENT>return ret<EOL>
Converts a time-string into a valid
    :py:class:`~datetime.datetime.DateTime` object.

        Args:
            s (str): string to be formatted.

        ``**kwargs`` is passed directly to :func:`.dateutil_parser`.

        Returns:
            :py:class:`~datetime.datetime.DateTime`