code: def _filterDictToStr(self, filterDict):
          
          values = []
          for key, vals in filterDict.items():
              if key not in ('contentRating', 'label'):
                  raise BadRequest('Unknown filter key: %s', key)
              values.append('%s=%s' % (key, '%2C'.join(vals)))
          return '|'.join(values)
docs: Converts friend filters to a string representation for transport.