code: def filter(self, value, model=None, context=None):
          
          value = str(value)
          if self.mode == 'left':
              return value.lstrip(self.chars)
          elif self.mode == 'right':
              return value.rstrip(self.chars)
          else:
              return value.strip(self.chars)
docs: Filter
          Performs value filtering and returns filtered result.
  
          :param value:               input value
          :param model:               parent model being validated
          :param context:             object, filtering context
          :return:                    filtered value