def _parse_datetime_local(
        cls, datetime_str: str
    ) -> Tuple[Optional[datetime.datetime], Optional[Exception]]:
        """Parse a string into a datetime object, accepts following formats
        1. Without fractional seconds (e.g. 2018-08-07T23:17:57)
        2. With fractional seconds (e.g. 2018-08-07T23:17:57.461050)

        Parameters
        ----------
        datetime_str: str
            The string represents a datetime

        Returns
        -------
        Tuple[Optional[datetime.datetime], Optional[Exception]]
            If the datetime_str is None, will return None immediately.
            If the datetime_str can be parsed correctly, it will return as the
            first element in the tuple.
            If the datetime_str cannot be parsed with all attempts, it will
            return None in the first element, the exception in the second
            element.
        """

        local_formats = [
            '%Y-%m-%dT%H:%M:%S.%f',
            '%Y-%m-%dT%H:%M:%S',

            '%m/%d/%YT%H:%M:%S.%f',
            '%m/%d/%YT%H:%M:%S'
        ]

        dt, _, excpt = try_parse_datetime_with_formats(
            datetime_str, local_formats)

        if excpt is not None:
            return None, excpt
        return dt, None
Parse a string into a datetime object, accepts following formats
        1. Without fractional seconds (e.g. 2018-08-07T23:17:57)
        2. With fractional seconds (e.g. 2018-08-07T23:17:57.461050)

        Parameters
        ----------
        datetime_str: str
            The string represents a datetime

        Returns
        -------
        Tuple[Optional[datetime.datetime], Optional[Exception]]
            If the datetime_str is None, will return None immediately.
            If the datetime_str can be parsed correctly, it will return as the
            first element in the tuple.
            If the datetime_str cannot be parsed with all attempts, it will
            return None in the first element, the exception in the second
            element.
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/functions/meta.py