code: def _validate_fold_has_outputs_or_count_filter(fold_scope_location, fold_has_count_filter, outputs):
      
      # This function makes sure that the @fold scope has an effect.
      # Folds either output data, or filter the data enclosing the fold based on the size of the fold.
      if fold_has_count_filter:
          # This fold has a filter on the "_x_count" property, so it is legal and has an effect.
          return True
  
      # At least one output in the outputs list must point to the fold_scope_location,
      # or the scope corresponding to fold_scope_location had no @outputs and is illegal.
      for output in six.itervalues(outputs):
          if output['fold'] == fold_scope_location:
              return True
  
      raise GraphQLCompilationError(u'Found a @fold scope that has no effect on the query. '
                                    u'Each @fold scope must either perform filtering, or contain at '
                                    u'least one field marked for output. Fold location: {}'
                                    .format(fold_scope_location))
docs: Ensure the @fold scope has at least one output, or filters on the size of the fold.