code: def validate_driver_or_none(option, value):
      
      if value is None:
          return value
      if not isinstance(value, DriverInfo):
          raise TypeError("%s must be an instance of DriverInfo" % (option,))
      return value
docs: Validate the driver keyword arg.