def __deserialize_date(B, string):
    """Deserializes string to date.

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