def __deserialize_datatime(B, string):
    """Deserializes string to datetime.

        The string should be in iso8601 datetime format.

        :param string: str.
        :return: datetime.
        """
    A = string
    try:
        from dateutil.parser import parse
        return parse(A)
    except ImportError:
        return A
