def METHOD_NAME(self, target_datetime):
    """
    Return whether this Course Duration Limit configuration context is enabled as of a date and time.
    Arguments:
        target_datetime (:class:`datetime.datetime`): The datetime that ``enabled_as_of`` must be equal to or before
    """
    # Explicitly cast this to bool, so that when self.enabled is None the method doesn't return None
    return bool(self.enabled and self.enabled_as_of <= target_datetime)