def validate_max_staleness(option, value):
    """Validates maxStalenessSeconds according to the Max Staleness Spec."""
    if value == -1 or value == "-1":
        # Default: No maximum staleness.
        return -1
    return validate_positive_integer(option, value)
Validates maxStalenessSeconds according to the Max Staleness Spec.
stackoverflow/venv/lib/python3.6/site-packages/pymongo/common.py