code: def transform_value(self, value):
          
          if not self.transform:
              return value
  
          try:
              # we store a staticmethod but we accept a method taking `self` and `value`
              return self.transform(self, value)
          except TypeError as e:
              if 'argument' in str(e):  # try to limit only to arguments error
                  return self.transform(value)
docs: Convert the value to be stored.
  
          This does nothing by default but subclasses can change this.
          Then the index will be able to filter on the transformed value.
          For example if the transform capitalizes some text, the filter
          would be ``myfield__capitalized__eq='FOO'``