  """
  Helper classes for parsers.
  """
  import datetime
  import decimal
  import json  # noqa
  import uuid
  
  from django.db.models.query import QuerySet
 
</s> remove         try:
 </s> add         with contextlib.suppress(KeyError):
import contextlib
  """
  Helper classes for parsers.
  """
import contextlib
  import datetime
  import decimal
  import json  # noqa
  import uuid
  
  from django.db.models.query import QuerySet
keep keep add keep keep keep keep keep keep
 Refactor: Replace try/except with contextlib.suppress() (#8676) 
rest_framework/utils/encoders.py