code: def deserialize_decimal(attr):
          
          if isinstance(attr, ET.Element):
              attr = attr.text
          try:
              return decimal.Decimal(attr)
          except decimal.DecimalException as err:
              msg = "Invalid decimal {}".format(attr)
              raise_with_traceback(DeserializationError, msg, err)
docs: Deserialize string into Decimal object.
  
          :param str attr: response string to be deserialized.
          :rtype: Decimal
          :raises: DeserializationError if string format invalid.