code: def _translators(attr, kwargs):
      
  
      # Add translators to a function or class
      def decorator(func):
          # Make sure we have the attribute
          try:
              xlators = getattr(func, attr)
          except AttributeError:
              xlators = {}
              setattr(func, attr, xlators)
  
          xlators.update(kwargs)
          return func
      return decorator
docs: Decorator which associates a set of translators (serializers or
      deserializers) with a given method.  The `attr` parameter
      identifies which attribute is being updated.