code: def to_dict(self):
          
          result_dict = {}
          for column in self.__table__.columns.keys():  # pylint: disable=no-member
              value = result_dict[column] = getattr(self, column, None)
              if isinstance(value, Decimal):
                  result_dict[column] = float(result_dict[column])
              elif isinstance(value, datetime.datetime):
                  result_dict[column] = value.isoformat()
          return result_dict
docs: Return the resource as a dictionary.
  
          :rtype: dict