              elif data in self.FALSE_VALUES:
                  return False
              elif data in self.NULL_VALUES and self.allow_null:
                  return None
          except TypeError:  # Input is an unhashable type
              pass
          self.fail('invalid', input=data)
  
      def to_representation(self, value):
          if value in self.TRUE_VALUES:
              return True
 
</s> remove         try:
 </s> add         with contextlib.suppress(TypeError): </s> remove                 except (ValueError, TypeError):
                    pass
            else:
                try:
                    parsed = self.datetime_parser(value, input_format)
                    return self.enforce_timezone(parsed)
                except (ValueError, TypeError):
                    pass
 </s> add                 parsed = self.datetime_parser(value, input_format)
                return self.enforce_timezone(parsed) </s> remove             except Exception:
                pass
 </s> add  </s> remove             try:
 </s> add             with contextlib.suppress(Exception): </s> remove                 try:
 </s> add                 with contextlib.suppress(TypeError):
              elif data in self.FALSE_VALUES:
                  return False
              elif data in self.NULL_VALUES and self.allow_null:
                  return None


          self.fail('invalid', input=data)
  
      def to_representation(self, value):
          if value in self.TRUE_VALUES:
              return True
keep keep keep keep replace replace keep keep keep keep keep
 Refactor: Replace try/except with contextlib.suppress() (#8676) 
rest_framework/fields.py