code: def filter_record(self, record):
          
          if len(record) >= self.max_length:
              return record[:self.max_length]
          else:
              return record
docs: Filter record, truncating any over some maximum length