Retrieves the datetime.time or None from the `time_override` attribute.

def _get_time_override(self):
        """
        Retrieves the datetime.time or None from the `time_override` attribute.
        """

        if callable(self.time_override):
            time_override = self.time_override()
        else:
            time_override = self.time_override

        if not isinstance(time_override, datetime_time):
            raise ValueError(
                'Invalid type. Must be a datetime.time instance.'
            )

        return time_override