code: def _validate_quota(quota):
      '''
      Helper to verify that quota parameters are valid
      '''
      if quota is not None:
          if not isinstance(quota, dict):
              raise TypeError('quota must be a dictionary, provided value: {0}'.format(quota))
          periods = ['DAY', 'WEEK', 'MONTH']
          if 'period' not in quota or quota['period'] not in periods:
              raise ValueError('quota must have a valid period specified, valid values are {0}'.format(','.join(periods)))
          if 'limit' not in quota:
              raise ValueError('quota limit must have a valid value'f _validate_quota(quota):
      '''
      Helper to verify that quota parameters are valid
      '''
      if quota is not None:
          if not isinstance(quota, dict):
              raise TypeError('quota must be a dictionary, provided value: {0}'.format(quota))
          periods = ['DAY', 'WEEK', 'MONTH']
          if 'period' not in quota or quota['period'] not in periods:
              raise ValueError('quota must have a valid period specified, valid values are {0}'.format(','.join(periods)))
          if 'limit' not in quota:
              raise ValueError('quota limit must have a valid value')
docs: Helper to verify that quota parameters are valid